2 Replies Latest reply on Feb 12, 2003 11:39 PM by Thomas Cherel

    Class loader issue between 2 separate web applications

    Thomas Cherel Novice

      I am experiencing what I think is a weird behavior (I am using the following JBoss version: 3.0.5 CVSTag=JBoss_3_0_5 Date=200301130206, with the Jetty bundle).

      I deployed 2 separates war files in JBoss. They have a different context root, they are packaged and deployed separately, they are basically two different web aplications. But it also happens that they both bundle the same identical servlet (no sharing, both contains the same set of classes, that's all).

      My problem is that it seems that the classes of the servlet common to both applications are shared (they are loaded only once in memory through the same class loader) between the two web applications. The only way I manage to make it work (not sharing the class between the two web applications) is to set Java2ClassLoadingCompliance to false in the jbossweb.sar/META-INF/jboss-service.xml.

      It seems weird to me, even with Java2ClassLoadingCompliance=true, that classes can be shared between two separate web application. Any ideas as why that might happen?
      It seems also weird to me that the default value of Java2ClassLoadingCompliance is not false. Servlet 2.3 spec should be followed first, don't you think?

      Thanks in advance for any help.

      Thomas