Classloader howto

From ARSWiki

Jump to: navigation, search

Contents

Classloader Howto's

This document provides a quick how-to on managing the application server classloaders to include.

Tomcat

  • Copy .class files to <tomcat_install_dir>/shared/classes
  • Copy .jar files to <tomcat_install_dir>/shared/lib

A complete reference can be found in the Tomcat Docs.

Note: If loading libraries or classes that are jni wrappers (remedy jars, ambient joarse jars), the libraries the jars reference must be in the path.

  • On linux and unix, the LD_LIBRARY_PATH must point to the location of the .so files
  • On windows...

JBoss

The JBoss classloader is difficult to use because it uses a flat classloader.

Using Shared Libraries

You will need to do this if using both the mid-tier and SLM Data Collector applications on a single JBoss instance.

Update /path/to/jboss//server/default/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml so that JBoss uses the Tomcat classloader:

<attribute name="Java2ClassLoadingCompliance">false</attribute>
<attribute name="UseJBossWebLoader">true</attribute>

You will then need to relocate the jni jar's to the shared lib path:

/path/to/jboss/server/default/lib

The files to relocate include:

  • arapi70.jar
  • arutil70.jar

References

http://jira.jboss.com/jira/browse/JBAS-1691


WebSphere

Personal tools