Editing application configurations using the wsadmin scripting tool

Use the wsadmin tool to configure application settings.

About this task

You can use the AdminApp edit or editInteractive command to change an entire application or a single application module.

You can set or update a configuration value using options in batch mode. To identify which configuration object is to be set or updated, the values of read only fields are used to find the corresponding configuration object. All the values of read only fields have to match with an existing configuration object, otherwise the command fails.

You can use pattern matching to simplify the task of supplying required values for certain complex options. Pattern matching only applies to fields that are required or read only.

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

Procedure

  1. 啟動 wsadmin Scripting 工具。
  2. Edit the entire application or a single application module. Use one of the following commands:
    • The following command uses the installed application and the command option information to edit the application:

      • Using Jacl:
        $AdminApp edit appname {options}
      • Using Jython list:
        AdminApp.edit('appname', ['options'])
      • Using Jython string:
        AdminApp.edit('appname', '[options]')
      Table 1. AdminApp edit command description. Run the edit command with the name of the application or module.
      Element Description
      $ is a Jacl operator for substituting a variable name with its value
      AdminApp is an object that supports application object management
      edit is an AdminApp command
      appname is the name of application or application module to edit. For the application module name, use the module name returned from listModules command as the value.
      {options} is a list of edit options and tasks similar to the ones for the install command
    • The following command changes the application information by prompting you through a series of editing tasks:

      • Using Jacl:
        $AdminApp editInteractive appname
      • Using Jython:
        AdminApp.editInteractive('appname')
      Table 2. AdminApp editInteractive command description. Run the editInteractive command with the name of the application or module.
      Element Description
      $ is a Jacl operator for substituting a variable name with its value
      AdminApp is an object that supports application object management
      editInteractive is an AdminApp command
      appname is the name of application or application module to edit. For the application module name, use the module name returned from listModules command as the value.
  3. Save the configuration changes.
    請利用下列指令範例來儲存您的配置變更:
    AdminConfig.save()
  4. In a network deployment environment only, synchronize the node.
    請利用 AdminNodeManagement Script 程式庫中的 syncActiveNode 或 syncNode Script,將配置變更傳播給節點。
    • 利用 syncActiveNodes Script,依照下列範例所示,將變更傳播給 Cell 中的每個節點:
      AdminNodeManagement.syncActiveNodes()
    • 利用 syncNode Script,依照下列範例所示,將變更傳播給特定的節點:
      AdminNodeManagement.syncNode("myNode")

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



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