Oracle WebLogic Class Loader Hierarchy

The detailed order for WebLogic class loading in top-down hierarchy follows:
  1. System Classloader
    1. WebLogic implementation classes
    2. Classes in the system classpath
    3. PRE_CLASSPATH and EXT_PRE_CLASSPATH
  2. Domain Classloader
    1. classes in the domain directory's lib folder
  3. Application Classloader
    1. Java EE shared libraries referenced in weblogic-application.xml
    2. Modules defined in the application
    3. Libraries from Java EE library
    4. Libraries from /APP-INF/lib
  4. Web Classloader
    1. Java EE shared libraries referenced in weblogic.xml
    2. Classes in WEB-INF/classes
    3. Libraries in WEB-INF/lib
WebLogic 10.3.3 allows for the Application to intercept the the System classloader. This is required for loading alternative versions of application libraries such as the Xerces and Ant. Doing so allows for the lower-level classloader (e.g. Web) to load classes/ libraries before the ones typically loaded by the System classloader.
In order to do this, the FilteringClassLoader mechanism a classloader that sits between Domain and Application  has to be used. this needs to be specified by the prefer-application-packages or prefer-web-inf XML tags.
If it interests you, the class-loading hierarchy for JBoss can be found here.

Comments

Popular posts from this blog

Understanding ITIL Service Management the UML way…

Apache Web Server Troubleshooting