+

Search Tips   |   Advanced Search

 

Modify WAR class loader policies for applications using scripting

 

You can use scripting and the wsadmin tool to modify WAR class loader policies for applications. Before starting this task, the wsadmin tool must be running. See the Start the wsadmin scripting client article for more information.

 

Overview

To modify WAR class loader policies 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:MyApp/]
      

    • Use Jython:

      dep = AdminConfig.getid("/Deployment:MyApp/")
      
      

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

    • Use Jacl:

      set deployedObject [$AdminConfig showAttribute $dep deployedObject]
      

    • Use Jython:

      deployedObject = AdminConfig.showAttribute(dep, "deployedObject")
      

  3. Show the current attribute values of the configuration object with the show command...

    • Use Jacl:

      $AdminConfig show $deployedObject warClassLoaderPolicy
      
      Example output:

      {warClassLoaderPolicy MULTIPLE}
      

    • Use Jython:

      AdminConfig.show(deployedObject, 'warClassLoaderPolicy')
      
      Example output:

      '[warClassLoaderPolicy MULTIPLE]'
      

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

    • Use Jacl:

      $AdminConfig modify $deployedObject {{warClassLoaderPolicy SINGLE}}
      

    • Use Jython:

      AdminConfig.modify(deployedObject, [['warClassLoaderPolicy', 'SINGLE']])
      

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

    • Use Jacl:

      $AdminConfig show $deployedObject warClassLoaderPolicy
      
      Example output:

      {warClassLoaderPolicy SINGLE}
      

    • Use Jython:

      AdminConfig.show(deployedObject, 'warClassLoaderPolicy')
      
      Example output:

      '[warClassLoaderPolicy SINGLE]'
      



Use the AdminConfig object for scripted administration

 

Related Reference


Commands for the AdminConfig object