Hello,
I saw the unit test and noticed that the mbeanServer was derived from
the broker instance which is BrokerService type.
In my case, I am not using BrokerService. My producer/consumer is using
"vm" protocol, such as "vm://localbroker".
How am I able to get a reference to my broker in this setup so that I
can get a reference to the mbeanServer?
Also note that in my test (patterned to MBeanTest.java), where I am
using BrokerService as a broker, the line "mbeanServer =
broker.getManagementContext().getMBeanServer();" throws a compilation
error that says "The method getMBeanServer() from the type
ManagementContext is not visible". So I tried using "mbeanServer =
broker.getManagementContext().findTigerMBeanServer();" and it still
worked in my test.
-don
Dejan Bosanac wrote:
Also checkout unit test, like this one
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java?view=markup
to see how to do it programatically.
Cheers
--
Dejan Bosanac - http://twitter.com/dejanb
Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net
On Wed, Sep 8, 2010 at 2:51 PM, Tracy Snell <tsn...@gmail.com> wrote:
That info is exposed through JMX. Fire up jconsole and browse and you'll see it.
On Sep 8, 2010, at 8:47 AM, Don Santillan wrote:
Hello,
Is there a way to monitor or count the queue size programmatically?
Can I see a sample code snippet?
Thanks!
Don