【发布时间】:2014-04-29 13:41:19
【问题描述】:
我想用 Scope:Cluster 创建一个 JMS 队列。
Session session = new Session();
ConfigService cService = new ConfigServiceProxy(aClient);
queryString = "Cluster=xxx";
ObjectName temp = cService.resolve(session, queryString)[0];
CommandMgr cmdMgr = CommandMgr.getCommandMgr(aClient);
AdminCommand cmd = cmdMgr.createCommand("createSIBJMSQueue");
cmd.setTargetObject(obj);
cmd.setParameter("name", Name);
cmd.setParameter("jndiName", "jms/"+Name);
cmd.setParameter("description", "FirstTryOfJMX");
cmd.setParameter("busName", "bus");
cmd.setParameter("queueName", "was");
cmd.setConfigSession(session);
cmd.execute();
CommandResult result = cmd.getCommandResult();
如果我选择其他范围,例如 -> Node="xxx":Server="xxx",则此示例效果很好。 我认为问题在于 WebSphere 的 resolve() 函数:我在文档中找到了这个
resolve
public javax.management.ObjectName[] resolve(Session session, javax.management.ObjectName scope, java.lang.String containmentPath)
resolve the config object from its containment path.
Parameters:
session - the seesion id. null may be supplied there a workspace will be created automatically and the change will be saved to repository.
scope - the scope of search. scope may be a **cell, node or server**. we do cell wide search if scope is null.
containmentPath - the containment path of config object.
只有Cell、Server和Node,没有Cluster.....
我想知道如何选择集群范围。
请帮忙
【问题讨论】:
-
我们尝试创建 JMSTopic stackoverflow.com/questions/42000532/… 失败。我们需要执行什么特定设置
标签: java jakarta-ee websphere jmx