如何列出所有JMS提供程序,包括具有特定范围的Default MQ消息提供程序

时间:2017-02-17 11:24:38

标签: jms websphere ibm-mq jython websphere-7

我有一个wsadmin命令来获取所有范围级别的JMS提供程序列表

AdminJMS.listJMSProviders()

上面的代码将具有以下输出

['"WebSphere MQ JMS Provider(cells/redhatserverNode01Cell/nodes/redhatserverNode01/servers/server1|resources.xml#builtin_mqprovider)"', 
'"WebSphere MQ JMS Provider(cells/redhatserverNode01Cell/nodes/redhatserverNode01|resources.xml#builtin_mqprovider)"', 
'"WebSphere MQ JMS Provider(cells/redhatserverNode01Cell|resources.xml#builtin_mqprovider)"', 
'sample(cells/redhatserverNode01Cell/nodes/redhatserverNode01/servers/server1|resources.xml#JMSProvider_1487316020150)']

我的问题是什么

  1. 如何获取特定范围的JMS提供程序

  2. 上述输出显示除默认MQ消息传递提供程序之外的所有提供程序,如何获取默认MQ消息传递提供程序

1 个答案:

答案 0 :(得分:0)

我无法帮助您显示默认的JMS提供程序,但您可以使用AdminConfig.list按范围进行筛选,

wsadmin>print AdminConfig.list('JMSProvider', '*cells/myCell/nodes/myNode/servers/server1*')
"WebSphere MQ JMS Provider(cells/myCell/nodes/myNode/servers/server1|resources.xml#builtin_mqprovider)"

wsadmin>print AdminConfig.list('JMSProvider', '*cells/myCell/nodes/myNode|*')
"WebSphere MQ JMS Provider(cells/myCell/nodes/myNode|resources.xml#builtin_mqprovider)"

wsadmin>print AdminConfig.list('JMSProvider', '*cells/myCell|*')
"WebSphere MQ JMS Provider(cells/myCell|resources.xml#builtin_mqprovider)"