Using the WebSphere® Application Server Deployment editor, you can define the class loader
policy for a specific application targeting a remote or local WebSphere Application Server.
Before you begin
- Create an enterprise application and target the server to a WebSphere Application Server
V6.1, or later.
About this task
To set class loader policy for an application on a WebSphere Application Server,
complete the following steps:
Procedure
- Switch to the Java™ EE perspective.
- The location of the WebSphere Application Server Deployment
editor depends on the specification-level of your enterprise application
project:
- If your enterprise application
(EAR) project is at 1.2, 1.3 or 1.4 specification-level, complete
the following steps:
- In the Enterprise Explorer view,
expand your enterprise application project folder.
- Under the enterprise application
project folder for which you want add or edit server configurations,
double-click the Deployment Descriptor to open
the Application Deployment Descriptor editor.
- Select the Deployment tab at the bottom of the editor.
Restriction: Before
adding or removing J2EE modules, using the Module page in the Application Deployment Descriptor editor, first click
the Deployment tab to activate the functions
in the deployment page. Then add or remove your modules from the Module
page. You need to complete this task for each Application Deployment
Descriptor editor session that you want to add or remove modules from
the Module page.
- If your enterprise application
(EAR) project is at 5.0 or later specification-level, complete the
following steps:
- In the Enterprise Explorer view,
right-click your enterprise application project folder.
- Select .
- Expand the Application section.
- In the Applications list box, select the application to
modify the class loader settings.
- In the Classloader mode field, select
the class loading mode for the application:
- 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_LAST causes the class loader
to attempt to load classes from its local class path before delegating
the class loading to its parent.
- In the WAR classloader policy field,
select the isolation level of Web modules.
- If this policy is set to APPLICATION, then the Web project contents also are loaded by the application
class loader (in addition to the EJB files, RAR files, dependency
JAR files, and shared libraries).
- If the policy is set to MODULE, then
each Web project receives its own class loader whose parent is the
application class loader.
- 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.
- Save your changes and close the editor. The
class loader policy settings have been added to the deployment descriptor
files.