0 Replies Latest reply on Sep 20, 2005 12:11 PM by Schacher

    listReceivers

    Schacher Newbie

      i need to know the delivery-state from the subscripter(s) of a queue.

       MBeanServer server = MBeanServerLocator.locateJBoss();
       MBeanInfo mbi = server.getMBeanInfo(new ObjectName(objectName));
       java.util.List list = (java.util.List)server.invoke(new ObjectName(objectName), "listReceivers", new Object[] {}, null);
       Iterator iter = list.iterator();
       while (iter.hasNext()) {
       System.err.println(iter.next().toString()); //test
       }
      


      .toString-Output (org.jboss.mq.Subscription):
      [Subscription[subId=-2147483648connection=ConnectionToken:ID:85/2a633b8cbbebd8bad96e79df034dc070 destination=QUEUE.eManager-docImportQueue messageSelector=MessageFormat = 'Version 3.4' Local Create]]
      ...
      


      question: how can i "get" the delivery-state with this informations?

      at the moment, i access the jmscontainerinvokermbean with the objectname (but i need a more generic solution).
       MBeanServer server = MBeanServerLocator.locateJBoss();
       ObjectName objectName = new ObjectName(objectnameofthequeuesubscripter);
       active = server.invoke(objectName, "getDeliveryActive", new Object[] {}, null);
      
      


      thank you for any hints
      marc