Debian Codegraph @

src/docbkx/tools/roo.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 ~ Copyright 2009-2013 Roland Huss
4 ~
5 ~ Licensed under the Apache License, Version 2.0 (the "License");
6 ~ you may not use this file except in compliance with the License.
7 ~ You may obtain a copy of the License at
8 ~
9 ~ http://www.apache.org/licenses/LICENSE-2.0
10 ~
11 ~ Unless required by applicable law or agreed to in writing, software
12 ~ distributed under the License is distributed on an "AS IS" BASIS,
13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ~ See the License for the specific language governing permissions and
15 ~ limitations under the License.
16 -->
17
18 <section id="tools-roo">
19 <title>Jolokia Roo Addon</title>
20 <para>
21 The Jolokia <ulink url="http://www.springsource.org/roo">Roo</ulink> addon allows for easy
22 integration of an agent servlet in an existing Roo web
23 project.
24 </para>
25 <note>
26 <para>
27 This addon has been submitted to the Roobot, a central Roo addon
28 registry. Until it is publicly available you can directly
29 install the addon from our repository.
30 </para>
31 <programlisting><![CDATA[
32 roo> osgi obr url add --url http://labs.consol.de/maven/repository/roo-repository.xml
33 roo> osgi obr start --bundleSymbolicName org.jolokia.roo]]></programlisting>
34 <para>
35 Alternatively, if there are problems with the approach above
36 (which is currently the case because the hard coded public PGP
37 keyserver which is used by Roo 1.1.1 is down) and you don't need
38 PGP verification, you can install the addon bundle directly from
39 our repository:
40 </para>
41 <programlisting><![CDATA[
42 roo> osgi start --url http://labs.consol.de/maven/repository/org/jolokia/jolokia-roo/0.83/jolokia-roo-0.83.jar]]></programlisting>
43 </note>
44 <para>
45 As soon as <filename>src/main/webapp/WEB-INF/web.xml</filename>
46 is available in the roo project, Jolokia can be setup with the
47 command <command>jolokia setup</command>. This will add the
48 proper dependency in the <filename>pom.xml</filename> and adapt
49 <filename>web.xml</filename> so that an agent servlet gets
50 registered under the subcontext <literal>jolokia</literal> (so,
51 when you web application is deployed under the context
52 <literal>/mywebapp</literal>, the agent is reachable under
53 <literal>/mywebapp/jolokia</literal>. This command knows about
54 the options described in <xref linkend="table-roo-options"/>,
55 all of which are optional.
56 </para>
57 <table id="table-roo-options">
58 <title>jolokia setup Options</title>
59 <thead>
60 <tr>
61 <td>Option</td>
62 <td>Description</td>
63 </tr>
64 </thead>
65 <tr>
66 <td><literal>--addPolicy</literal></td>
67 <td>
68 This adds an additional
69 <filename>jolokia-access.xml</filename> below
70 <filename>src/main/resources</filename> to allow putting
71 access restrictions into place. The installed template,
72 however, doesn't come with any restriction but contains
73 sample configurations commented out.
74 </td>
75 </tr>
76 <tr>
77 <td><literal>--addJsr160Proxy</literal></td>
78 <td>
79 Adapts the agent servlet's <constant>init-param</constant>
80 to add an additional
81 <classname>org.jolokia.jsr160.Jsr160RequestDispatcher</classname>
82 request dispatcher which allows the installed servlet to act
83 as an JSR-160 proxy. See <xref linkend="proxy"/> for details
84 about the JSR-160 proxy
85 </td>
86 </tr>
87 <tr>
88 <td><literal>--addDefaultInitParams</literal></td>
89 <td>By default, the servlet gets registered without any init
90 parameters. With this option, all available
91 <literal>init-param</literal> are added to the servlet
92 definition with their default values.</td>
93 </tr>
94 </table>
95 </section>