Modifying WAR class loader policies for applications using wsadmin scripting

You can use scripting and the wsadmin tool to modify WAR class loader policies for applications.

Before you begin

啟動 wsadmin Scripting 工具。

About this task

Attention: 如果應用程式在執行中,變更應用程式設定會使應用程式重新啟動。 在獨立式伺服器上,會在儲存變更之後重新啟動應用程式。 在多重伺服器產品上,會在儲存變更之後重新啟動應用程式,在安裝應用程式的節點上,檔案會同步化。 如果要控制多重伺服器產品上的同步化時機,請在「主控台」喜好設定頁面上取消選取與節點同步變更

Complete the steps in this topic to modify WAR class loader policies for an application.

Procedure

  1. Retrieve the configuration ID of the object that you want to modify and set it to a variable.

    For example, set the configuration ID to the dep variable. In this example, the object is the deployed application MyApp.

    • Using Jacl:
      set dep [$AdminConfig getid /Deployment:MyApp/]
    • Using Jython:
      dep = AdminConfig.getid("/Deployment:MyApp/")
  2. Identify the deployed object and set it to a variable.

    For example, set the deployed object to the depObject variable:

    • Using Jacl:
      set depObject [$AdminConfig showAttribute $dep deployedObject]
    • Using Jython:
      depObject = AdminConfig.showAttribute(dep, "deployedObject")
  3. Show the current attribute values of the configuration object with the show command.
    • Using Jacl:
      $AdminConfig show $depObject warClassLoaderPolicy
      Example output:
      {warClassLoaderPolicy MULTIPLE}
    • Using Jython:
      AdminConfig.show(depObject, 'warClassLoaderPolicy')
    Example output:
    '[warClassLoaderPolicy MULTIPLE]'
  4. Modify the attributes of the configuration object with the modify command.
    • Using Jacl:
      $AdminConfig modify $depObject {{warClassLoaderPolicy SINGLE}}
    • Using Jython:
      AdminConfig.modify(depObject, [['warClassLoaderPolicy', 'SINGLE']])
  5. Save the configuration changes.
    請利用下列指令範例來儲存您的配置變更:
    AdminConfig.save()
  6. Optional: Verify the changes that you made to the attribute value with the show command.
    • Using Jacl:
      $AdminConfig show $depObject warClassLoaderPolicy
      Example output:
      {warClassLoaderPolicy SINGLE}
    • Using Jython:
      AdminConfig.show(depObject, 'warClassLoaderPolicy')
      Example output:
      '[warClassLoaderPolicy SINGLE]'

指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: July 9, 2016 11:19
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_warclass
檔名:txml_warclass.html