简体   繁体   English

在WebSphere上使用JMX创建JMS队列

[英]Creating JMS Queue with JMX on WebSphere

I want to create a JMS Queue with Scope:Cluster. 我想使用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();

This Example works very well if i choose other scopes like -> Node="xxx":Server="xxx". 如果我选择其他作用域(例如-> Node =“ xxx”:Server =“ xxx”),则此示例效果很好。 I think the problem is the resolve() function from WebSphere: I find this on docu 我认为问题是来自WebSphere的resolve()函数:我在docu上找到了这个

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.

Theres only Cell,Server and Node but no Cluster..... 只有单元,服务器和节点,而没有群集.....

I would like to know how to select Cluster Scopes. 我想知道如何选择群集作用域。

Pls Help 请帮助

在WebSphere的Containment Path术语中,clusters的关键字是ServerCluster ,而不是Cluster

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM