Tutorials
WebSphere
WebSphere V5.0 : Web Development - Understand classpath and module dependencies
WebSphere V5.0 : Web Development - Understand classpath and module dependencies - Page 2
The following example shows that when the application class-loader policy of an application server is set to MULTIPLE, each application on the server has its own class loader. An application class loader also loads its Web modules if the application's WAR class-loader policy is set to APPLICATION. If the policy is set to MODULE, then a Web module uses its own class loader.
Application class-loader policy: MULTIPLE
Application 1
.....Module: EJB1.jar
.....Module: WAR1.war
..........MANIFEST Class-Path: Dependency1.jar
..........WAR Classloader Policy = MODULE
Application 2
.....Module: EJB2.jar
..........MANIFEST Class-Path: Dependency2.jar
.....Module: WAR2.war
..........WAR Classloader Policy = APPLICATION

There are two possible values for a class-loader mode:
WebSphere Studio provides you with editors so that you may change your server configurations. To edit a server configuration, you can do one of the following:
Depending on what run-time environment the server configuration is defined to use, or whether it is defined as a local or remote configuration, the fields that you can change may be different.
If you want to run several WebSphere application servers at the same time, you need to change the port settings by selecting the Ports tab located at the bottom of the WebSphere Configuration Editor. For more information about the various port settings, refer to the WebSphere Application Server documentation.
When editing a WebSphere server, you can specify the class loader isolation mode that you want to use for the application server.
1. Double-click on the server in the Server Configuration view. The server editor opens.
2. Click the Configuration tab.
3. You can specify one of the following in the Application class loader policy field:
a. SINGLE for J2EE application mode. Only one Enterprise application class loader for all applications deployed in an application server.
b. MULTIPLE for Compatibility mode. Each enterprise application gets its own application class loader.

4. Save and close the editor.
You can define class loader policy for a specific application for a WebSphere test environment or server.
1. In the Server Configuration view or Servers view, double-click the server to open it. The server editor opens.
2. Click the Applications tab at the bottom of the editor.
3. In the Applications list box, select the application to modify the class loader settings.
4. In the Classloader mode field, select the class loading mode for the application:
5. In the WAR classloader policy field, select the isolation level of Web modules.

6. In the Start weight field, specify the order in which projects in an J2EE application are started. Lower weighted projects are started before higher weighted projects.
7. Save and close the editor.
_____________
Author: Mikalai Zaikin. Please Click Here to visit Authors site for any updates and changes to the study notes.
First Page: WebSphere V5.0 : Web Development - Understand classpath and module dependencies