Some thoughts on App Class Loader
"This article's main reference article Appclassloader's author is the famous Java Vision boss Robbin"
 
I have not seen the Java depth adventure, but also how many have heard about class loader discussion, read Robbin wrote the app Class loader article deep experience, here with their own words to sum up a little.
 
The operation of a Java system allows the simultaneous presence of different JVM Class loader, and understanding the relationship between different loader is critical, as shown in the following figure
 
APP Class Loader
|-----EJB Class Loader
|-----Web App Class Loader
 
The APP class loader level is globally visible, and its two loader are only locally effective and non-interference.
 
The loading order for APP Class loader is jre/lib/* => jre/lib/ext/* => jre/classes/* =>
 
The loading range of Web App Class Loader is in web-inf/lib/* and web-inf/classes/*
They will be in the loading range to start looking for and call into the required class/jar/lib, if the failure of the loading responsibility to the app Class Loader, which is called the class Loader inheritance relationship
 
The loading scope of the EJB Class Loader is limited to the jar or ear range. APP server creates an instance of EJB class loader for each EJB package file, for example: When you publish Hello.jar, World.jar two jars, the system creates two instances of EJB class loader, To load these two EJB packets, so Hello.jar does not see any files other than itself. Also, if you want to invoke the name of a class library other than the jar package, you need to define Class-path:log4j.jar in the manifest file of the jar bundle Hibernate2.jar
 
This article explains that you may be a little unfamiliar class loader also has hierarchical inheritance relationship, the visability of usable classes/jars is defined by the class loader and all its ance Stors. This concept is very important in the Java EE, need to understand well.