2014-04-29 36 views
1

我想使用Scope:Cluster創建JMS隊列。在WebSphere上使用JMX創建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 

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. 

即使世界唯一的細胞,服務器和節點,但沒有集羣.....

我想知道如何選擇羣集範圍。

請幫助

+0

我們嘗試過並且無法創建JMSTopic http://stackoverflow.com/questions/42000532/not-able-to-create-jms-topic-programatically-in-websphere。有沒有我們需要執行的任何特定設置 – kusumat

回答

0

在WebSphere的遏制路徑行話,對於集羣關鍵字ServerCluster,不Cluster

+0

完美!它工作.....你怎麼知道的?ServerCluster ...... 在所有的文件中都沒有調用Cluster ServerCluster ..... – DevJam

+0

轉到'wsadmin',然後'$ AdminConfig types' ,並在那裏尋找「集羣」一詞。那是IBM。 :-) – Isaac

相關問題