JBoss AS 7 classloading explained

Discussions

News: JBoss AS 7 classloading explained

  1. JBoss AS 7 classloading explained (1 messages)

    As mandated by Java EE specifications, an application server should ideally give its deployed applications the freedom to use whatever utility library and whatever version of it, regardless of the presence of concurrent applications that want to use the same library.

    This is also known as namespace isolation (Java EE 5 specifications, section EE.8.4). However, loading classes from different namespaces can raises some issues which are not easy to solve: for example, what happens if I pack a newer version of an utility library with my application, while an older version of the same library was loaded by the application server? Or also, how can I use two different versions of the same utility library, simultaneously, within the same instance of the application server? The JBoss AS classloading strategy has changed sensibly through the years: basically, the 4.x releases of the application server used a UnifiedClassLoader, which aimed at reducing communications overhead between running applications, as class data could be shared by reference or simple copies.
        
    One of the major outstanding issues not resolved with the UnifiedClassLoader is classloading dependencies. The idea being that if one application (A) uses the classes of another application (B), the system should know to redeploy A when B gets redeployed, otherwise it will be referencing stale classes. There were actually two different attempts to try to make this work, without the user having to configure anything. Neither attempt really worked and both were dropped. Since JBoss AS 5.0 was introduced, a new class loader based on the new Virtual File System (VFS). The VFS was implemented to simplify and unify file handling within the application server. The new class loader, named the VFS class loader, uses VFS to locate JAR and class files. Even though this represented a significant change in how classes are loaded in JBoss AS 5.0, the resulting behavior is much the same as for prior versions of JBoss AS.
        
    Read the rest of the article at the following URL:

    JBoss AS 7 classloading explained - Java Code Geeks

    Threaded Messages (1)

  2. solution for module jar[ Go to top ]

    Please do have a look at my blog for the sample or soultion on how we can implement this

    http://jbossas7.blogspot.com/2012/09/jboss-as-7-class-loading-resolution.html