There are a lot of examples on how to get broker data using JMX in unit tests. Take a look at this one for example
https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java?hb=true <https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java?hb=true> Regards -- Dejan Bosanac - http://twitter.com/dejanb ----------------- The experts in open source integration and messaging - http://fusesource.com ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Tue, Jun 14, 2011 at 2:56 PM, Aneesh <cv_ane...@yahoo.co.in> wrote: > In the JMX Console when we click on a queue name link say > "BrokerName=localhost,Destination=dlq.queue,Type=Queue" > we will get a page (which lists Queue size, EnqueueCount, DequeueCount etc) > which describes the JMX MbeanView of the queue(ie dlq.queue) which we have > selected. > > I need to get the same info in my java code.Is it possible? > > Scenario is like this: > I have an instance of BrokerService with me. > I tried checking in the BrokerService and BrokerView (obtained as > brokerService.getAdminView()) > but unable to find any suitable placeholders for getting a specific queue > information. > Tried invoking getDestinations() on the broker instance.It returned a list > of ActiveMQDestinations. > But that also doesnt have the MBean attributes which i need to check for a > specific Queue. > Please help me. > > Thanks > Aneesh > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Gathering-the-information-of-a-Queue-in-Java-tp3596470p3596470.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >