| 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 |
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" |
| 19 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 20 |
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> |
| 21 |
|
| 22 |
<display-name>JSON JMX Agent</display-name> |
| 23 |
|
| 24 |
<servlet> |
| 25 |
<servlet-name>jolokia-agent</servlet-name> |
| 26 |
<servlet-class>org.jolokia.http.AgentServlet</servlet-class> |
| 27 |
<init-param> |
| 28 |
<description> |
| 29 |
Debugging state after startup. Can be changed via |
| 30 |
the Config MBean during runtime |
| 31 |
</description> |
| 32 |
<param-name>debug</param-name> |
| 33 |
<param-value>false</param-value> |
| 34 |
</init-param> |
| 35 |
<init-param> |
| 36 |
<description> |
| 37 |
Entries to keep in the history. Can be changed during |
| 38 |
runtime via the config MBean |
| 39 |
</description> |
| 40 |
<param-name>historyMaxEntries</param-name> |
| 41 |
<param-value>10</param-value> |
| 42 |
</init-param> |
| 43 |
<init-param> |
| 44 |
<description> |
| 45 |
Maximum number of entries to keep in the local |
| 46 |
debug history if switched on. Can be change via |
| 47 |
the config MBean during runtime. |
| 48 |
</description> |
| 49 |
<param-name>debugMaxEntries</param-name> |
| 50 |
<param-value>100</param-value> |
| 51 |
</init-param> |
| 52 |
<init-param> |
| 53 |
<description> |
| 54 |
Maximum depth when traversing bean properties. |
| 55 |
If set to 0, depth checking is disabled |
| 56 |
</description> |
| 57 |
<param-name>maxDepth</param-name> |
| 58 |
<param-value>15</param-value> |
| 59 |
</init-param> |
| 60 |
<init-param> |
| 61 |
<description> |
| 62 |
Maximum size of collections returned when |
| 63 |
serializing to JSON. When set to 0 |
| 64 |
collections are not truncated. |
| 65 |
</description> |
| 66 |
<param-name>maxCollectionSize</param-name> |
| 67 |
<param-value>0</param-value> |
| 68 |
</init-param> |
| 69 |
<init-param> |
| 70 |
<description> |
| 71 |
Maximum number of objects which is traversed |
| 72 |
when serializing a single response. Use this |
| 73 |
as airbag to avoid boosting your memory and |
| 74 |
network traffic. Nevertheless when set to 0 |
| 75 |
not limit is used. |
| 76 |
</description> |
| 77 |
<param-name>maxObjects</param-name> |
| 78 |
<param-value>0</param-value> |
| 79 |
</init-param> |
| 80 |
<init-param> |
| 81 |
<description> |
| 82 |
Options specific for certain application |
| 83 |
server detectors. Detectors can evaluate these |
| 84 |
options and perform a specific initialization based |
| 85 |
on these options. The value is a JSON object with |
| 86 |
the detector's name as key and the options as value. |
| 87 |
E.g. '{glassfish: {bootAmx: false}}' would prevent |
| 88 |
the booting of the AMX subsystem on a glassfish with |
| 89 |
is done by default. |
| 90 |
</description> |
| 91 |
<param-name>detectorOptions</param-name> |
| 92 |
<param-value>{}</param-value> |
| 93 |
</init-param> |
| 94 |
<init-param> |
| 95 |
<description> |
| 96 |
This option specifies in which order the key-value properties within |
| 97 |
ObjectNames as returned by "list" or "search" are returned. By default |
| 98 |
this is the so called 'canonical order' in which the keys are sorted |
| 99 |
alphabetically. If this option is set to "false", then the natural |
| 100 |
order is used, i.e. the object name as it was registered. This option |
| 101 |
can be overridden with a query parameter of the same name. |
| 102 |
</description> |
| 103 |
<param-name>canonicalNaming</param-name> |
| 104 |
<param-value>true</param-value> |
| 105 |
</init-param> |
| 106 |
<init-param> |
| 107 |
<description> |
| 108 |
Whether to include a stacktrace of an exception in case |
| 109 |
of an error. By default it it set to "true" in which case |
| 110 |
the stacktrace is always included. If set to "false", no |
| 111 |
stacktrace is included. If the value is "runtime" a stacktrace |
| 112 |
is only included for RuntimeExceptions. This global option |
| 113 |
can be overridden with a query parameter. |
| 114 |
</description> |
| 115 |
<param-name>includeStackTrace</param-name> |
| 116 |
<param-value>true</param-value> |
| 117 |
</init-param> |
| 118 |
<init-param> |
| 119 |
<description> |
| 120 |
When this parameter is set to "true", then an exception thrown |
| 121 |
will be serialized as JSON and included in the response |
| 122 |
under the key "error_value". By default it is "false". This global |
| 123 |
option can be overridden by a query parameter of the same name. |
| 124 |
</description> |
| 125 |
<param-name>serializeException</param-name> |
| 126 |
<param-value>false</param-value> |
| 127 |
</init-param> |
| 128 |
<init-param> |
| 129 |
<description> |
| 130 |
If discoveryEnabled is set to true, then this servlet will listen |
| 131 |
for multicast discovery request and responds with its agent URL and |
| 132 |
other server specific information. Instead of setting this confog variable, |
| 133 |
discovery can be also enabled via the system property "jolokia.discoveryEnabled" |
| 134 |
or the environment variable "JOLOKIA_DISCOVERY_ENABLED". |
| 135 |
|
| 136 |
In addition the config parameter "discoveryAgentUrl" can be used to set the the agent's URL. |
| 137 |
By default, auto detection (after the first request was processed by the servlet)) of the URL is used. |
| 138 |
If the URL is set, then discovery is automatically enabled (i.e. there is |
| 139 |
no need to set "discoveryEnabled=true"). This configuration option |
| 140 |
is especially useful if the WAR is used in a proxy setup. Instead of setting the URL |
| 141 |
here, it can be set also either via the system property "jolokia.discoveryAgentUrl" or the |
| 142 |
environment variable "JOLOKIA_DISCOVERY_AGENT_URL". |
| 143 |
</description> |
| 144 |
<param-name>discoveryEnabled</param-name> |
| 145 |
<param-value>false</param-value> |
| 146 |
</init-param> |
| 147 |
<load-on-startup>1</load-on-startup> |
| 148 |
</servlet> |
| 149 |
|
| 150 |
<servlet-mapping> |
| 151 |
<servlet-name>jolokia-agent</servlet-name> |
| 152 |
<url-pattern>/*</url-pattern> |
| 153 |
</servlet-mapping> |
| 154 |
|
| 155 |
<!-- |
| 156 |
Example Configuration for switching on BASIC security. The role 'Jolokia' |
| 157 |
must be mapped to real users with passwords on the Appserver side: |
| 158 |
|
| 159 |
<login-config> |
| 160 |
<auth-method>BASIC</auth-method> |
| 161 |
<realm-name>jolokia</realm-name> |
| 162 |
</login-config> |
| 163 |
|
| 164 |
<security-constraint> |
| 165 |
<web-resource-collection> |
| 166 |
<web-resource-name>Jolokia-Agent Access</web-resource-name> |
| 167 |
<url-pattern>/*</url-pattern> |
| 168 |
</web-resource-collection> |
| 169 |
<auth-constraint> |
| 170 |
<role-name>jolokia</role-name> |
| 171 |
</auth-constraint> |
| 172 |
</security-constraint> |
| 173 |
|
| 174 |
<security-role> |
| 175 |
<role-name>Jolokia</role-name> |
| 176 |
</security-role> |
| 177 |
--> |
| 178 |
</web-app> |
| 179 |
|
| 180 |
<!-- |
| 181 |
Copyright 2009-2010 Roland Huss |
| 182 |
|
| 183 |
Licensed under the Apache License, Version 2.0 (the "License"); |
| 184 |
you may not use this file except in compliance with the License. |
| 185 |
You may obtain a copy of the License at |
| 186 |
|
| 187 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 188 |
|
| 189 |
Unless required by applicable law or agreed to in writing, software |
| 190 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 191 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 192 |
See the License for the specific language governing permissions and |
| 193 |
limitations under the License. |
| 194 |
--> |
| 195 |
|