|
Problem(Abstract) |
How to modify the classloader mode in a deployed Web
application? |
|
|
|
Resolving the
problem |
The following commands set the classloader mode for a
specific WAR module. Perform the following commands at the WSADMIN prompt
or in a JACL script:
TestApplicationis the name of the installed
application:
- set deployments [$AdminConfig getid /Deployment:TestApplication/].
- set deploymentObject [$AdminConfig showAttribute $deployments
deployedObject].
- set myModules [lindex [$AdminConfig showAttribute $deploymentObject
modules] 0].
- set myWarModule [lindex $myModules 0].
- $AdminConfig modify $myWarModule {{classloaderMode PARENT_LAST}}
- $AdminConfig save
- Verify the change with:
$AdminConfig show $myWarModule
This script modifies the classloaderMode attribute in the deployment.xml
file of the application.
Be careful with Step 3 and 4. In step 3 we are getting the index of the
first war module. The indexing starts at zero(0) and NOT one(1). You must
determine the index of the desired WAR module in the list of modules
contained in variable $myModules. If you run command list
$myModules, you'll see a listing of application modules and can
determine the index, which is 0-based. |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|