使用 wsadmin 脚本编制来配置新的可引用对象
可以使用脚本编制和 wsadmin 工具来配置新的可引用对象。
开始之前
关于此任务
执行以下步骤配置新的可引用对象。
过程
- 识别父标识并将其指定给 newrep 变量。
使用 Jacl:
set newrep [$AdminConfig getid /Cell:mycell/Node:mynode/ ResourceEnvironmentProvider:REP1/]
使用 Jython:
newrep = AdminConfig.getid('/Cell:mycell/Node:mynode/ ResourceEnvironmentProvider:REP1/') print newrep
示例输出:REP1(cells/mycell/nodes/mynode|resources.xml#ResourceEnvironmentProvider_1)
- 标识必需属性:
使用 Jacl:
$AdminConfig required Referenceable
使用 Jython:
print AdminConfig.required('Referenceable')
示例输出:Attribute Type factoryClassname String classname String
- 设置必需的属性:
使用 Jacl:
set fcn [list factoryClassname REP1] set cn [list classname NM1] set refAttrs [list $fcn $cn]
使用 Jython:
fcn = ['factoryClassname', 'REP1'] cn = ['classname', 'NM1'] refAttrs = [fcn, cn] print refAttrs
示例输出:{factoryClassname {REP1}} {classname {NM1}}
- 创建新的可引用对象:
使用 Jacl:
set newref [$AdminConfig create Referenceable $newrep $refAttrs]
使用 Jython:
newref = AdminConfig.create('Referenceable', newrep, refAttrs) print newref
示例输出:(cells/mycell/nodes/mynode|resources.xml#Referenceable_1)
- 保存配置更改。有关更多信息,请参阅“使用 wsadmin 工具来保存配置更改”主题。
- 仅在 Network Deployment 环境中使节点同步。请参阅“使用 wsadmin 工具同步节点”主题,以了解更多信息。
相关任务:


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