+

Search Tips   |   Advanced Search

 

Modify class loader modes for applications using scripting

 

You can modify class loader modes for an application with scripting and the wsadmin tool. Before starting this task, the wsadmin tool must be running. See the Start the wsadmin scripting client article for more information.

 

Overview

To modify class loader modes for an application, perform the following steps:

 

Procedure

  1. Retrieve the configuration ID of the object to modify and set it to the dep variable. For example:

    • Use Jacl:

      set dep [$AdminConfig getid /Deployment:ivtApp/]
      

    • Use Jython:

      dep = AdminConfig.getid('/Deployment:ivtApp/')
      

  2. Identify the deployed object and set it to the depObject variable. For example:

    • Use Jacl:

      set depObject [$AdminConfig showAttribute $dep deployedObject]
      

    • Use Jython:

      depObject = AdminConfig.showAttribute(dep, 'deployedObject')
      

  3. Identify the class loader and set it to the classldr variable. For example:

    • Use Jacl:

      set classldr [$AdminConfig showAttribute $depObject classloader]
      

    • Use Jython:

      classldr = AdminConfig.showAttribute(depObject, 'classloader')
      

  4. Show the current attribute values of the configuration object with the showall command...

    • Use Jacl:

      $AdminConfig showall $classldr
      
      Example output:

      {libraries {}} {mode PARENT_FIRST}
      

    • Use Jython:

      print AdminConfig.showall(classldr)
      
      Example output:

      [libraries []] [mode PARENT_FIRST]
      
      

  5. Modify the attributes of the configuration object with the modify command, for example:

    • Use Jacl:

      $AdminConfig modify $classldr {{mode PARENT_LAST}}
      

    • Use Jython:

      AdminConfig.modify(classldr, [['mode', 'PARENT_LAST']])
      

  6. Verify the changes that you made to the attribute value with the showall command, for example:

    • Use Jacl:

      $AdminConfig showall $classldr
      
      Example output:

      {libraries {}} {mode PARENT_LAST}
      

    • Use Jython:

      AdminConfig.showall(classldr)
      
      Example output:

      [libraries []] [mode PARENT_LAST]
      



Use the AdminConfig object for scripted administration

 

Related Reference


Commands for the AdminConfig object