0

在 wsadmin 中,我想找到JMSProvider附加到特定Node. 但是,节点下有许多服务器也有同名的提供者。当我要求提供提供者列表时,我从当前节点获取一个,但也从所有子节点获取。

wsadmin>print AdminConfig.list('Node')
MELW46K962S_node(cells/gmm_cell/nodes/MELW46K962S_node|node.xml#Node_1)
dmgr_node(cells/gmm_cell/nodes/dmgr_node|node.xml#Node_1)

wsadmin>print AdminConfig.list('JMSProvider', 'MELW46K962S_node(cells/gmm_cell/nodes/MELW46K962S_node|node.xml#Node_1)')
... excluding those providers with a different name ...
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/app_01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/profiled_app01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/rep_01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/rep_02|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/rep_03|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/server1|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node/servers/web_01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/gmm_cell/nodes/MELW46K962S_node|resources.xml#builtin_mqprovider)"

无需解析 ID,有没有一种方法可以用来查找这些WebSphere MQ JMS Providers 中的哪一个属于该节点?(即最后一个,在这种情况下)。

4

1 回答 1

2

尝试AdminConfig.getId代替AdminConfig.list

AdminConfig.getid("/Node:%s/JMSProvider:/" % nodename).splitlines()

请注意,在这种情况下,nodename应该只是节点的名称(即MELW46K962S_node),而不是由 获得的节点的完整配置 ID AdminConfig.list('Node')

于 2012-03-08T17:03:56.280 回答