Java Reference
In-Depth Information
When deploying an EAR containing multiple EJB-JARs, WARs, RARs, and other mod-
ules, the EAR module may easily contain thousands of individual classes. All these classes
need to be resolved, loaded, and managed by the EE server, which isn't an easy task when
different WARs may contain different versions of the same classes. We'll discuss next how
an EE server handles this “JAR hell.”
13.2. Exploring class loading
To explore EE server class loading, we'll first briefly review how Java class loaders work,
and then we'll give a concise explanation of typical EE server class-loading strategies. Fin-
ally, we'll finish up by reviewing the EE specifications for dependencies between common
EE modules.
13.2.1. Class-loading basics
Class loading in Java works based on a hierarchical structure of class loaders, with each
class loader responsible for loading certain classes and each loader building on top of the
previous one. This basic structure is depicted in figure 13.2 .
Search WWH ::




Custom Search