You can configure the application class loaders for an application server. Class loaders enable applications that are deployed on the application server to access repositories of available classes and resources. This topic assumes that an administrator created an application server on a WebSphere Application Server product.
The application class-loader policy controls the isolation of applications that run in the system (on the server). An application class loader groups enterprise bean (EJB) modules, shared libraries, resource adapter archives (RAR files), and dependency Java archive (JAR) files associated to an application. Dependency JAR files are JAR files that contain code which can be used by both enterprise beans and servlets. The application class-loader policy controls whether an application class loader can be shared by multiple applications or is unique for each application.
Use the settings page for the application server to specify the application class-loader policy for the server:
Option | Description |
---|---|
Single | Applications are not isolated from each other. Uses a single application class loader to load all of the EJB modules, shared libraries, and dependency JAR files in the system. |
Multiple | Applications are isolated from each other. Gives each application its own class loader to load the EJB modules, shared libraries, and dependency JAR files of that application. |
The application class loading mode specifies the class-loader mode when the application class-loader policy is Single.
On the settings page for the application server, select either of the following values:
Option | Description |
---|---|
Parent first | Causes the class loader to delegate the loading of classes to its parent class loader before attempting to load the class from its local class path. Parent first is the default value for class loading mode. |
Parent last | Causes the class loader to attempt to load classes from its local class path before delegating the class loading to its parent. Using this policy, an application class loader can override and provide its own version of a class that exists in the parent class loader. |
An identifier is assigned to a class-loader instance. The instance is added to the collection of class loaders shown on the Class loader page.