2 Replies Latest reply on Dec 29, 2004 5:17 PM by davidsills

    Scoped class loading on 3.2.4

      I have tried everything I can think of / read about / guess at to enable scoped classloading in my applications. The particular application I want to do this for is the Axis 1.2 standard distribution, placed in an exploded EAR file with the necessary application.xml. I don't see why the fact that it's exploded should make any difference, so I put the requisite jboss-app.xml file in the META-INF directory:

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-app>
      <loader-repository>
      jetson-axis:loader=jetson-axis.ear
      <loader-repository-config>
      java2ParentDelegation=false
      </loader-repository-config>
      </loader-repository>
      </jboss-app>


      I have tried every variation I could think of on this file (setting parent delegation to true, changing the names, using "service" instead of "loader", as that's what one reference said to do, etc.) without the slightest success.

      Of course, there will be other applications in addition to Axis to which I will want to apply this. I'm doing this as a proof of concept, and it isn't proving. I really don't want my applications to know anything about unified classloading at all. I don't merely want it to be the last resort, I don't want it to work. If I don't include a class in my Axis WEB-INF/lib, I want it to die horribly, as it does on other app servers. Is there a way to achieve this? Is scoped classloading that way? Does scoped classloading for some reason not work on exploded EAR files? If not, is there another way?

      I'll grant that for many unified classloading may be the best thing since sliced bread, but I'm in need of something else. Does that mean I have to abandon JBoss, which I otherwise like very much?

      Many thanks, and apologies for any whiff of frustration I was unable to remove from this note. Happy New Year!

      David Sills

        • 1. Re: Scoped class loading on 3.2.4

          More information about JBoss classloader and Isolation of EAR archives you can find on JBoss wiki pages: http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
          and: http://www.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases gives you detalied scenarios which may explain you a lot how to configure JBoss.

          Regards
          Janusz

          • 2. Re: Scoped class loading on 3.2.4

            Janusz: Many thanks for your reply and the references. I have carefully read the latter and followed them scrupulously, and I am still getting "bleeding" of classes. I have returned to using Axis as a directly deployed WAR file and used the jboss-web.xml file to configure scoped classloading exactly as shown. However, Axis is still able to load classes belonging to the unified classloader, even though I set Java2ParentDelegation of the scoped repository to false. As I understand it, that should be impossible. I don't know what else to do. I have worked with J2EE for years, and am proficient with at least four app servers other than JBoss--I've simply never come up against a problem this intractable. Of course, I may just be being an idiot. That, too, has happened before.