【问题标题】:Creating JMS Queue with JMX on WebSphere在 WebSphere 上使用 JMX 创建 JMS 队列
【发布时间】: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.....

我想知道如何选择集群范围。

请帮忙

【问题讨论】:

标签: java jakarta-ee websphere jmx


【解决方案1】:

在 WebSphere 的遏制路径术语中,集群的关键字是 ServerCluster,而不是 Cluster

【讨论】:

  • 完美!它工作......你怎么知道的?ServerCluster......在所有的文档中,从来没有调用过 Cluster ServerCluster......
  • 转至wsadmin,然后转至$AdminConfig types,并在那里查找“集群”一词。那是IBM。 :-)
猜你喜欢
  • 2012-10-08
  • 2011-10-02
  • 1970-01-01
  • 1970-01-01
  • 2010-11-12
  • 1970-01-01
  • 2017-04-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多