1 Reply Latest reply on Nov 12, 2004 3:30 PM by Elias Ross

    War classloader isolation - 3.2.3

    Kerry Ward Newbie

      I am using jboss 3.2.3 and am having an issue with getting isolated class loading for wars. I have two wars within an ear and I have a resource property file in the WEB-INF\classes folder of each war. Initially I had a problem with both wars using the same resource file (whichever was loaded first). Then I found this explanation in the wikis documentation.

      In jboss-3.2.3, the jbossweb-tomcat41.sar is configured to use a unified class loader as the web application class loader. This is controlled by the UseJBossWebLoader? attribute in the jbossweb-tomcat41.sar/META-INF/jboss-service.xml descriptor. The use of a unified class loader means that the classes available in the war inside of the WEB-INF/classes and WEB-INF/jars are incorporated into the default shared class loader repository. This may not be what you want as its contrary to the default servlet 3.2 class loading model and can result in sharing of classes/resources between web applications. You can disable this by setting this attribute to false.

      So I set the UseJBossWebLoader to false. Now I get a MissingResourceException when I try to load the resource file. So instead of isolating the loading of the war class files as expected, I seem to have disabled loading of the war class files.

      Thanks in advance for any help on this issue.