You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by James Strachan <ja...@gmail.com> on 2006/03/09 12:21:31 UTC

[heads up] MBeanTest for testing out JMX operations on the MBeans

We've got a whole host of MBeans available in 4.x which now have more  
than just the basic statistics; you can create/delete queue/topic/ 
durable topic subscriptions as well as browse queues, purge queues,  
copy messages around etc.

Up to now alot of these MBeans were not tested though :)

I've just added MBeanTest which tests most of the basic operations...
http://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq- 
core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java

its a JUnit test case that sends messages to a queue, then browses  
them, copies them, removes them all via JMX with the MBean. Many  
thanks to Vik who provided a chunk of the initial JMX code.

As folks add new operations to the MBeans we should add tests for  
them to this test. If ever you experience any JMX wierdness it'll be  
good to use this test case to diagnose.

BTW to help debugging/introspection, you can run this test from the  
command line, where it will pause until the user hits return - so  
after the test has run you can fire up JConsole and view the MBeans etc.

James
-------
http://radio.weblogs.com/0112098/