The usability of JMX has been somewhat let down due to a lack of quality JMX management consoles. JConsole and JVirtualVM do give good access to MBeans, but they rely on a RMI connection which can be tricky to setup to a remote machine. JMiniX avoids the RMI by allowing access to the MBeans via a servlet you can add to your webapplication.
The instructions were straight forward to follow and the steps were simply:
- Add dependency to your pom
- Add a repository to your pom (bummer – needs restlet.org which is not in maven central – if it was I’d consider adding JMiniX to our released test webapp)
- Define the servlet in your web.xml
- Build and run!
You can see by the screen shot above that the console gives a nice rendering of the available mbeans from the JVM and Jetty (and cometd if running). Attributes can be viewed and updated, and operations can be called – all the normal stuff. It only gives direct mbean access and does not provide any higher level management functions, but this is not a big problem if the mbeans are well designed and self documented.
Also if you wanted to develop more advanced management functions, then the restful nature of JMiniX should make this fairly straight forward. For example attributes can be retrieved with simple requests like:
That returns JSON like:
JMiniX looks like a great tool to improve the management of your servers and applications and to leverage the value already built into the Jetty JMX mbeans.
We had been working on a similar effort for restful access to JMX, but JMiniX is more advanced. It does lack some of the features that we had been working on like aggregate access to repeated attributes, but considering the state of JMiniX, we may consider contributing those features to that project instead.