Thursday, October 25, 2007

Integrating JAMon war with your application on Websphere

We were using the JAMon package for performance monitoring. We needed to integrate the JAMon WAR file contents into our application so that we could get the web-pages used for monitoring the application.

On Websphere 6.1, the class-loader hierarchy and our security policies did not allow for JAMon libs to be added at the system class-loader level.
One option was to include the contents of the JAMon war file into our WAR file.

But I thought a cleaner option would be to make a EAR file with 2 web-modules (one war of my application and other jamon.war)
On WAS 6.1, I changed the class-loader policy of the application to: Single class loader for application.

The application.xml file for the EAR file contained the following items:

<application id="Application_ID">
<display-name>MyApplication.ear</display-name>
<module>
<web>
<web-uri>MyApplication.war</web-uri>
<context-root>MyApplication</context-root>
</web>
</module>

<module>
<web>
<web-uri>jamon.war</web-uri>
<context-root>jamon</context-root>
</web>
</module>
</application>

No comments:

Post a Comment