2 Replies Latest reply: Feb 9, 2012 9:16 AM by Adam Green RSS

    manuallyAddResource() in CLI  not appearing to work correctly

    Adam Green Newbie

      I am trying to add a JMS queue which has not been auto discovered by rhq, to rhq.

      Using the following method call:


      // I have hard coded the values here for the purpose of this discussion


      DiscoveryBossRemote dbr = client.getDiscoveryBossRemote();

      dbr.manuallyAddResource(subject, 10152, 10416, cfg);


      10152 is the resourcetypeid for a jbm jms queue resource, 10416 is the parentresourceid for jms queues of the same resource type which have been auto discovered by rhq. In the cfg I have added the following fields as simple properties:


      name = "errorqueue"

      JNDIName = "/errorqueue"

      serverPeer = "jboss.messasing.service=serverPeer"


      The client and subject fields are correct as used successfully by other operations.


      There are no syntax/compile/runtime errors, the method finishes running but the resource is not added.

      Please be aware I have had to manually type the code here, it is not pasted, so ignore what would be syntax errors from the text here.


      Any advice would be much appreciated!