4.5. ClassLoaders in Geronimo

Each module (service module, application module, or resource module) has its own ClassLoader. The hierarchy of ClassLoaders matches the hierarchy of modules. So if a Web Application module has an EJB JAR as its parent, then the ClassLoader for the EJB JAR will be the parent of the ClassLoader for the Web Application. Clearly the ClassLoader arrangement is one of the key reasons to configure the module dependencies in Geronimo.

Within an application EAR, EJBs and RARs are loaded in one ClassLoader, while Web Applications are loaded in a child of that ClassLoader. The ClassLoader hierarchy for an EAR including one module of each type and using a database would look like Figure 4.2, “EAR ClassLoader Hierarchy”.

Figure 4.2. EAR ClassLoader Hierarchy

EAR ClassLoader Hierarchy

TODO: THIS DIAGRAM MUST BE UPDATED!!

Notes on Figure 4.2, “EAR ClassLoader Hierarchy”:

The full module hierarchy in a Geronimo server can be quite complex. Here's an example:

Figure 4.3. Geronimo Module Graph

Geronimo Module Graph