6 Replies Latest reply on Apr 30, 2008 3:13 AM by rizzatoa

    JBOSS AS 4.2 ClassLoading Model

    smpub2000

      Is there updated documentation available for Jboss 4.2 Class loading model? Its not clear for version 4.2 from the url: http://wiki.jboss.org/wiki/ClassLoadingConfiguration

      I have a ear file deployed to jboss, with a log4j.properties, but the file gets ignored. I want to understand the classloading model for 4.2 AS, and the order of inheritance of libs (Server|EAR|WAR).

        • 1. Re: JBOSS AS 4.2 ClassLoading Model
          jaikiran

           

          "smpub2000" wrote:
          Is there updated documentation available for Jboss 4.2 Class loading model? Its not clear for version 4.2 from the url: http://wiki.jboss.org/wiki/ClassLoadingConfiguration

          As far as i know, nothing has changed in 4.2 related to this. The same documentation holds good for 4.2 as well.

          "smpub2000" wrote:

          I have a ear file deployed to jboss, with a log4j.properties, but the file gets ignored. I want to understand the classloading model for 4.2 AS, and the order of inheritance of libs (Server|EAR|WAR).


          Answered in your other post at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=134223

          • 2. Re: JBOSS AS 4.2 ClassLoading Model

            Hello,
            I'm trying to deploy a ear with multiple wars inside using application isolation at ear level (jboss-app.xml) and default classloading for jboss 4.2.2GA.

            I find that some webapps are sharing the same class instance of a library (strutslayout or jboss) and therefore loading a properties file from a different one (the most recently deployed).
            Is this due to siblings classloaders sharing tha same repository cache (multiple UCLs associated))? If this is the case, how can one achieve classloading isolation between webmodules inside the same ear (jboss-web.xml is ignored when deploying ear)?


            TIA,
            Andrea

            • 3. Re: JBOSS AS 4.2 ClassLoading Model
              smpub2000

               

              "jaikiran" wrote:
              "smpub2000" wrote:
              Is there updated documentation available for Jboss 4.2 Class loading model? Its not clear for version 4.2 from the url: http://wiki.jboss.org/wiki/ClassLoadingConfiguration

              As far as i know, nothing has changed in 4.2 related to this. The same documentation holds good for 4.2 as well.

              From this document, am I correct to infer that if scoped class loading is enabled using com.example:archive=unique-archive-name
              in jboss-app.xml, the sub-modules in the ear (WAR, EJB-JAR) don't inherit classes in the jar libraries from parent EAR/lib/ ? or does this apply only to "sibling" EARs? Both?




              • 4. Re: JBOSS AS 4.2 ClassLoading Model
                smpub2000

                continued from previous post,..and how about if the sub-module EJBs etc have references to jars in their META-INF/MANIFEST.MF but scoped classloading is enabled; eg Classpath ../APP-INF/lib/log4j.jar

                • 5. Re: JBOSS AS 4.2 ClassLoading Model
                  jaikiran

                   

                  From this document, am I correct to infer that if scoped class loading is enabled using com.example:archive=unique-archive-name
                  in jboss-app.xml, the sub-modules in the ear (WAR, EJB-JAR) don't inherit classes in the jar libraries from parent EAR/lib/ ? or does this apply only to "sibling" EARs? Both?


                  You are scoping the entire EAR file, which means the WAR/EJB-JAR within the EAR will share the classes present in the EAR. However the other EAR(s) (i guess that's what you meant by "sibling") will not have access to these classes.

                  • 6. Re: JBOSS AS 4.2 ClassLoading Model

                    Is there a way to isolate WARs when deployed inside a EAR?

                    I think it would legitimate to expect that one can isolate a WAR from the others deployed on the same EAR; am I wrong?