0 Replies Latest reply on Nov 24, 2010 8:12 AM by Emre He

    org.jboss.mq.server.jmx.QueueMBean replacement issue during jbossmq migration to jboss messaging

    Emre He Newbie

      With the help from jboss community, i am working on jbossmq migration to jboss messaging, till now the myQueue on jboss messaging is online, but at the Queue client side, i need to update current old codes for Compatibility, below is the target code pieces:



      import org.jboss.mq.server.jmx.TopicMBean;

      QueueMBean queueMbean = (org.jboss.mq.server.jmx.QueueMBean) ServiceLocator.getInstance().MbeanLookup("jboss.messaging.destination:name=testQueue,service=Queue", org.jboss.mq.server.jmx.QueueMBean.class);

      depth = queueMbean.getMaxSize();

      messageCount = queueMbean.getAllMessageCount();{code}


      as you know, we have no jbossmq.jar, so i don't know what is corresponding to the org.jboss.mq.server.jmx.QueueMBean in jboss messaging.


      i need to use the mehods:




      depths[0] = topicMbean.getMaxDepth();
      depths[1] = topicMbean.getAllMessageCount();


      i tried to use org.jboss.jms.server.destination.DestinationMBean, but it only has getMaxSize() for getMaxDepth(), i can not find the method has same function to getAllMessageCount().


      if i use org.jboss.jms.server.destination.QueueMBean, it has getAllMessageCount(), but does not has getMaxSize().


      so what could i do?