1 Reply Latest reply on Nov 8, 2005 6:37 PM by majohnst

    Log4j Classloader Isolation

    majohnst

      I have gone around the block trying to isolate log4j, but I cannot get anything to work. I have read through the wiki
      http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
      http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
      http://wiki.jboss.org/wiki/Wiki.jsp?page=Logging

      My file looks like:

      geara.ear
      - geara.ejb3
      - geara.par
      - geara.war
      - lib/geara.jar
      - lib/log4j.jar
      - META-INF
      -- MANIFEST.MF
      -- jboss-app.xml
      -- application.xml

      In my Manifest, I added

      Class-Path: lib/geara.jar lib/log4j.xml
      


      and in my jboss-app I have
       <loader-repository>
       geara:loader=geara.ear
       <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
       </loader-repository>
      
      


      According to the wiki, the jboss-app settings should isolate all the classes contained in my EAR from the UCL. I have included the log4j.jar and log4j.xml (inside my geara.jar) in my isolated classloader, so the log4j should not be pulling from the system wide log4j. I have also included the same setup for isolation in my war using the jboss-web isolation settings and placing log4j under WEB-INF/lib and log4j.xml in WEB-INF/classes

      So from my understanding, my application sohuld be completely isolated. But whenever I start jboss (4.0.3), my custom log4j.xml is never loaded.

      Can anyone tell if I am missing a step?