[jboss-user] EAR classloading

Angel Todorov attodorov at gmail.com
Sat Feb 17 05:09:07 EST 2007


Hi All,

Our company is evaluating JBoss as an application server choice for
our current applications to be deployed on. I have two questions
regarding the structure of the EAR in JBOSS with respect to class
loading.

According to the J2EE 1.4 specification, one can put utility jars in
the EAR, which are visible to all wars and EJB modules that make up
the enterprise application. I am trying to do that with JBoss, but get
ClassNotFoundExceptions. If i put all jars in the WAR that needs them,
all classes are loaded properly.

My second question is regarding class loader isolation in the EAR
scope. Suppose I have some enterpise application and several webapps
in it. At some point they both require the same libraries (jars), but
one of the webapps wants to use a specific version of some jar only
for itself. If I have some X.jar as a utility jar visible to two WARs,
and WAR 1 has another version of X.jar in its own lib directory, which
classes will be loaded first when the respective class in the webapp 1
requests them - the ones in its own lib directory, or the shared ones?

Thank you very much for the feedback.

Best Regards,
Angel



More information about the jboss-user mailing list