RESTFul JMX: Open Java Management

Goal

One of my goals in last job was:

Allow third party systems and user access, in easy way, to JMX MBeans[1] provided by our Enterprise application

The common solution was to use "JMX Remoting" (JSR160)  and than, i had to choose:
  • A "JMX remoting" protocol
  • A "JMX viewer" compliant with such protocol

Choosing a JXM Remoting protocol

I found several supported protocols such as rmi, iiop, jmxmp, soap  provided by the MX4J project which last release has been in 2006. 

Lately, JBoss community, has released a remoting-jmx, a project to provide the integration required to expose JMX over Remoting 3 connections.

Chooosing a JMX Viewer

Concerning JMX Viewer the most popular are JConsole and VisualVM  both are monitoring tool provided by JDK, while if we need web-based solution, we have to catch from open source marketplace (see http://java-source.net/open-source/jmx

After investigation

After this investigation I understood that I would have been kept busy a while, to do technical evaluation and test of all the possibilities and my thought was:
"Also if JMX is the natural way to have access to technical monitoring & management, it lacks a lightweight tool to expose mbeans and to browse them securely on any application and environment without heavy infrastructure setup."

The last search

Before starting this activity I launched a last search with the keywords: "JSON + JMX"  and i found out the solution of my problem.  Two names came out that have caught my attention JOLOKIA & JMINIX.

Jolokia

Jolokia is a JMX-HTTP bridge giving an alternative to JSR-160 connectors. It is an agent based approach with support for many platforms. In addition to basic JMX operations it enhances JMX remoting with unique features like bulk requests and fine grained security policies.

JminiX

Don't want to use an external full-blown JMX console? Just want to have a simple JMX entry point into your new or existing apps? If the answer is yes, JMiniX is your solution

Both of them allow to access to MBean(s) in RESTFul way (HTTP+REST+JSON) but, in addition,  JMiniX offers also a built-in web console (see fig. below)


JMiniX Console

Conclusion

Jolokia looks like more a complete framework ready for enterprise solution and offer a wide range of solution, while JMiniX is less ambitious but very easy to deploy,configure and use.

Finally, i've proposed to use JMiniX especially for the availability of  a web console and i've deployed it as an independent web app (ie agent)  in order to have a complete solution "out-of-box"

if you have interest in technical monitoring & management of your Java application, take a look of these projects because, as stated in post's title, they open the Java management making its use more simple & powerful

Enjoy JMX ....





[1] In the Java programming language, an MBean (managed bean) is a Java object that represents a manageable resource, such as an application, a service, a component, or a device.

Comments

  1. You might want to have also a look at hawt.io which is a lightweight HTML5 JMX consol using Jolokia under the hood, which gained quite some momemtum in the last time.

    ReplyDelete
  2. Hi Roland, thanks for feedback

    hawt.io looks really awesome !!

    ReplyDelete

Post a Comment

Popular posts from this blog

Google Web Toolkit Vs AngularJS

PlantText: The new "Online" UML Editor powered by PlantUML

PlantUML & Maven - Enrich your project's documentation