使用 wsadmin 脚本编制来配置新的 URL 提供程序

可以使用脚本编制和 wsadmin 工具来配置新的 URL 提供程序。

开始之前

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

关于此任务

请执行以下步骤来配置新的 URL 提供程序。

过程

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

      set node [$AdminConfig  getid  /Cell:mycell/Node:mynode/]
    • 使用 Jython:

      node = AdminConfig.getid('/Cell:mycell/Node:mynode/')
      print node
    示例输出:
    mynode(cells/mycell/nodes/mynode|node.xml#Node_1)
  2. 标识必需属性:
    • 使用 Jacl:

      $AdminConfig required URLProvider
    • 使用 Jython:

      print AdminConfig.required('URLProvider')
    示例输出:
    Attribute   Type
    streamHandlerClassName   String
    protocol                        Stringname     String
  3. 设置必需的属性:
    • 使用 Jacl:

      set name [list name URLP1]
      set shcn [list streamHandlerClassName "Put the stream handler classname here"]
      set protocol [list protocol "Put the protocol here"]
      set urlpAttrs [list $name $shcn $protocol]
      示例输出:
      {name URLP1} {streamHandlerClassName {Put the stream handler classname here}} {protocol {Put the protocol here}}
    • 使用 Jython:

      name = ['name', 'URLP1']
      shcn = ['streamHandlerClassName', "Put the stream handler classname here"]
      protocol = ['protocol', "Put the protocol here"]
      urlpAttrs = [name, shcn, protocol]
      print urlpAttrs
      示例输出:
      [[name, URLP1], [streamHandlerClassName, "Put the stream handler classname here"],  
      [protocol, "Put the protocol here"]]
  4. 创建 URL 提供程序:
    • 使用 Jacl:

      $AdminConfig create URLProvider $node $urlpAttrs
    • 使用 Jython:

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

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



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