See ClassLoadingConfiguration.

Available option in deploy/jbossweb-tomcat.sar/META-INF/jboss-service.xml

or deploy/jboss-web.deployer/META-INF/jboss-service.xml

configuration options toggles usage of separate classloaders for web
modules. The JBoss unified classloader holds all the classes from
multiple web applications in one big classloader and may cause unwanted


web modules “sales.war” and “stock.war”, both containing some version
of “utility.jar”. In case “sales.war” uses version 1.0 and “stock.war”
requires version 2.0, turning off the unified web loader is the safest
solution. If you don’t, the first loaded library will have priority,
and remains in the classloader till the reference count drops to zero.

disadvantage of using isolated classloaders: either you need to
duplicate the same library across multiple web modules, or add it to
the classpath of your server instance (default: lib/). The instance
libraries are defaults, they can be overridden when the web module
contains it’s own custom versions.

configuration file contains a small comment about isolation of JSP
files as well, to separate two JSP files with the same name from two
different web modules. In JBoss 4.0.5, using non-precompiled JSP pages,
this seems to work fine, even with the JBoss unified web loader.

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注