0 Replies Latest reply on Oct 25, 2012 12:41 PM by Raphael Ferreira

    JBoss AS 6 Classloading - How it works?

    Raphael Ferreira Newbie



      I'm trying to understand how classloading works in JBoss AS 6. I started searching at the JBoss AS 6 docs but I couldn't find any information. Searching at google I've found two






      The first one seems to be about the JBoss 4, but I started there. I couldn't undertand very well this unifiedclassloader3. It says:


      "The All UnifiedClassLoader3 node represents the UCLs created by deployers. This covers EARs, jars, WARs, SARs and directories seen by the deployment scanner as well as JARs referenced by their manifests and any nested deployment units they may contain. This is a flat namespace and there should not be multiple instances of a class in different deployment JARs. If there are, only the first loaded will be used and the results may not be as expected."


      Does it mean that if I have some lib in my war app and there is another version of the same lib in another app, may be that my app will use the other lib?


      The second page talks about the JBoss Web classloading. There it says that a classloader will be created for each web app. In this scenario I understood that different versions of the same lib inside different apps will not conflict. Is that true? How is the second classloader model (JBoss Web) related to the first? Does JBoss AS 6 mantain the same model?


      Sorry for this bunch of questions. I'm trying to understant that subject but I'm having no luck. I don't even know if I am in the right direction. I would appreciate any sugestion. And, sorry for my english.