Question

I want to create a JMS Queue with Scope:Cluster.

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". I think the problem is the resolve() function from WebSphere: I find this on 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

Was it helpful?

Solution

In WebSphere's Containment Path lingo, the keyword for clusters is ServerCluster, not Cluster.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top