使用 wsadmin 来配置 URL 的定制属性

使用 wsadmin 脚本编制工具来设置 URL 的定制属性。

开始之前

开始本任务前,wsadmin 工具必须正在运行。有关更多信息,请参阅关于启动 wsadmin 脚本编制客户机的主题。

关于此任务

执行以下步骤为 URL 配置新的定制属性。

过程

  1. 识别父标识并将其指定给 newurl 变量。
    • 使用 Jacl:

      set newurl [$AdminConfig getid /Cell:mycell/Node:mynode/URLProvider:URLP1/URL:URL1/]
    • 使用 Jython:

      newurl = AdminConfig.getid('/Cell:mycell/Node:mynode/URLProvider:URLP1/URL:URL1/')
      print newurl
    示例输出:
    URL1(cells/mycell/nodes/mynode|resources.xml#URL_1)
  2. 创建 J2EE 资源属性集:
    • 使用 Jacl:

      set propSet [$AdminConfig showAttribute $newurl propertySet]
    • 使用 Jython:

      propSet = AdminConfig.showAttribute(newurl, 'propertySet') 
      print propSet
    示例输出:
    (cells/mycell/nodes/mynode|resources.xml#J2EEResourcePropertySet_7)
  3. 标识必需属性:
    • 使用 Jacl:

      $AdminConfig required J2EEResourceProperty
    • 使用 Jython:

      print AdminConfig.required('J2EEResourceProperty')
    示例输出:
    Attribute            Type
    name     String
  4. 设置必需的属性:
    • 使用 Jacl:

      set name [list name RP3]
      set rpAttrs [list $name]
    • 使用 Jython:

      name = ['name', 'RP3']
      rpAttrs = [name]
  5. 创建 J2EE 资源属性:
    • 使用 Jacl:

      $AdminConfig create J2EEResourceProperty $propSet $rpAttrs
    • 使用 Jython:

      print AdminConfig.create('J2EEResourceProperty', propSet, rpAttrs)
    示例输出:
    RP3(cells/mycell/nodes/mynode|resources.xml#J2EEResourceProperty_7)
  6. 保存配置更改。有关更多信息,请参阅“使用 wsadmin 工具来保存配置更改”主题。
  7. 仅在 Network Deployment 环境中使节点同步。请参阅“使用 wsadmin 工具同步节点”主题,以了解更多信息。

指示主题类型的图标 任务主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_customurl
文件名:txml_customurl.html