Modifying class loader modes for applications using scripting
We can modify class loader modes for an application with scripting and the wsadmin tool.
Before you begin
Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
About this task
To modify class loader modes for an application, perform the following steps:
Procedure
- Retrieve the configuration ID of the object that you want to modify and set it to the dep variable. For example:
Using Jacl
set dep [$AdminConfig getid /Deployment:ivtApp/]Using Jython
dep = AdminConfig.getid('/Deployment:ivtApp/')
- Identify the deployed object and set it to the depObject variable. For example:
Using Jacl
set depObject [$AdminConfig showAttribute $dep deployedObject]Using Jython
depObject = AdminConfig.showAttribute(dep, 'deployedObject')
- Identify the class loader and set it to the classldr variable. For example:
Using Jacl
set classldr [$AdminConfig showAttribute $depObject classloader]Using Jython
classldr = AdminConfig.showAttribute(depObject, 'classloader')
- Show the current attribute values of the configuration object with the showall command, for example:
Using Jacl
$AdminConfig showall $classldrExample output:
{libraries {}} {mode PARENT_FIRST}Using Jython
print AdminConfig.showall(classldr)Example output:
[libraries []] [mode PARENT_FIRST]
- Modify the attributes of the configuration object with the modify command, for example:
Using Jacl
$AdminConfig modify $classldr {{mode PARENT_LAST}}Using Jython
AdminConfig.modify(classldr, [['mode', 'PARENT_LAST']])
- Verify the changes that you made to the attribute value with the showall command, for example:
Using Jacl
$AdminConfig showall $classldrExample output:
{libraries {}} {mode PARENT_LAST}Using Jython
AdminConfig.showall(classldr)Example output:
[libraries []] [mode PARENT_LAST]
Related tasks
Using the AdminConfig object for scripted administration Related reference
Commands for the AdminConfig object