XA-Labs/org.parallelj — Issue #52: Need to add jolokia-agent servlet in web.xml from //J archetype
Author: abhijit-g
Created: 2012-02-22 10:48:05+00:00
State: open

In "parallelj-archetype\src\main\resources\archetype-resources\src\main\webapp\WEB-INF\web.xml" need to add jolokia-agent servlet and it's mapping as below.

----------------------------------------- Web.xml ---------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">

<servlet>
<servlet-name>jolokia-agent</servlet-name>
<servlet-class>org.jolokia.http.AgentServlet</servlet-class>
<init-param>
<description>
Class names (comma separated) of RequestDispatcher used in addition
to the LocalRequestDispatcher
</description>
<param-name>dispatcherClasses</param-name>
<param-value>org.jolokia.jsr160.Jsr160RequestDispatcher</param-value>
</init-param>
<init-param>
<description>
Debugging state after startup. Can be changed via
the Config MBean during runtime
</description>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<description>
Entries to keep in the history. Can be changed during
runtime via the config MBean
</description>
<param-name>historyMaxEntries</param-name>
<param-value>10</param-value>
</init-param>
<init-param>
<description>
Maximum number of entries to keed in the local
debug history if switched on. Can be change via
the config MBean during runtime.
</description>
<param-name>debugMaxEntries</param-name>
<param-value>100</param-value>
</init-param>
<init-param>
<description>
Maximum depth when traversing bean properties.
If set to 0, depth checking is disabled
</description>
<param-name>maxDepth</param-name>
<param-value>15</param-value>
</init-param>
<init-param>
<description>
Maximum size of collections returned when
serializing to JSON. When set to 0, not
collections are truncated.
</description>
<param-name>maxCollectionSize</param-name>
<param-value>1000</param-value>
</init-param>
<init-param>
<description>
Maximum number of objects which is traversed
when serializing a single response. Use this
as airbag to avoid boosting your memory and
network traffic. Nevertheless, when set to 0
not limit is used.
</description>
<param-name>maxObjects</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>jolokia-agent</servlet-name>
<url-pattern>/jolokia/*</url-pattern>
</servlet-mapping>

<listener>
<listener-class>
org.parallelj.launching.quartz.web.ServersInitializerListener
</listener-class>
</listener>

</web-app>

--------------------------------------------------------------- end ---------------------------------------------------------