4 Replies Latest reply on Feb 18, 2007 2:02 PM by jaikiran pai

    EAR classloading

    Angel Todorov Newbie

      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?

      My JBOSS version is:

      Version: 4.0.5GA(build: CVSTag=Branch_4_0 date=200610162340)
      Version Name: Zion
      Built on: October 16 2006

      Thank you very much for the feedback.

      Best Regards,
      Angel