使用 wsadmin 脚本编制来配置资源环境条目的定制属性
可以使用 wsadmin 脚本编制为资源环境条目配置新的定制属性。
开始之前
关于此任务
执行以下步骤为资源环境条目配置新的定制属性。
过程
- 识别父标识并将其指定给 newree 变量。
使用 Jacl:
set newree [$AdminConfig getid /Cell:mycell/Node:mynode/ResourceEnvEntry:REE1/]
使用 Jython:
newree = AdminConfig.getid('/Cell:mycell/Node:mynode/ResourceEnvEntry:REE1/') print newree
示例输出:REE1(cells/mycell/nodes/mynode|resources.xml#ResourceEnvEntry_1)
- 创建 J2EE 定制属性集:
使用 Jacl:
set propSet [$AdminConfig showAttribute $newree propertySet]
使用 Jython:
propSet = AdminConfig.showAttribute(newree, 'propertySet') print propSet
示例输出:(cells/mycell/nodes/mynode|resources.xml#J2EEResourcePropertySet_5)
- 标识必需属性:
使用 Jacl:
$AdminConfig required J2EEResourceProperty
使用 Jython:
print AdminConfig.required('J2EEResourceProperty')
示例输出:Attribute Type name String
- 设置必需的属性:
使用 Jacl:
set name [list name RP1] set rpAttrs [list $name]
使用 Jython:
name = ['name', 'RP1'] rpAttrs = [name]
- 创建 J2EE 定制属性:
使用 Jacl:
$AdminConfig create J2EEResourceProperty $propSet $rpAttrs
使用 Jython:
print AdminConfig.create('J2EEResourceProperty', propSet, rpAttrs)
示例输出:RPI(cells/mycell/nodes/mynode|resources.xml#J2EEResourceProperty_1)
- 保存配置更改。有关更多信息,请参阅“使用 wsadmin 工具来保存配置更改”主题。
- 仅在 Network Deployment 环境中使节点同步。请参阅“使用 wsadmin 工具同步节点”主题,以了解更多信息。
相关任务:


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_envcustom
文件名:txml_envcustom.html