JBoss Community

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

created by Emre He in Beginner's Corner - View the full discussion

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:

 

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);

 

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:

QueueMbean.getMaxDepth()
QueueMbean.getAllMessageCount();

 

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?

 

thanks,

Emre

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community