This question is not about how JMX works or what JMX does. This question is about applications of JMX in a standard application server environment in production. It is not for specific server either.
What do you monitor with JMX in production environment that runs standard stack of Java EE services: database access (JDBC and JPA), session EJBs, JMS, web server, web services, AJAX-enabled services?
 The Java Management Extensions (JMX) framework is a well-known tool for any experienced Java developer. The purpose of the JMX framework is to simplify the management of local and remote Java applications while providing a user-friendly interface.
Java Management Extensions (JMX) is a Java technology that supplies tools for managing and monitoring applications, system objects, devices (such as printers) and service-oriented networks. Those resources are represented by objects called MBeans (for Managed Bean).
JMX Monitoring to Improve the Performance of Java Applications. Easily monitor JVMs and Java web application servers with the eG Enterprise JMX monitoring solution. Improve the performance of your applications by identifying bottlenecks at the code-level and in the infrastructure.
At the JVM level, I monitor the garbage collection duration per minute,
At the Servlet Container level, I monitor the number of requests, number of exceptions (4xx & 5xx codes) , sum of request duration per minute,
At the SOAP level, I monitor the number of invocations, number of exceptions & sum of invocations per operation and per minute,
At the Web MVC Framework level, I monitor the number of invocations, number of exceptions & sum of invocations per action and per minute,
For the pools (datasource,thread pool / executor service), I monitor the active count,
For the JMS connections, I monitor the number of sent & received messages per minute, and the number of active receivers,
For EhCache, I monitor the number of entries in the cache, the number of hits & miss per minute,
At the business application level, I developped an @Profiled annotation to monitor the number of invocations, number of exceptions and total duration per minute.
If you are interested in such kind of metrics, we developed many JMX extras (dbcp, util.concurrent, jms, @profiled annotation) and packaged all this with Spring XML namespace based configuration, Hyperic HQ plugins, monitoring jsp pages, etc
The details are here : http://code.google.com/p/xebia-france/wiki/XebiaManagementExtras .
All this code is licensed under the business friendly Open Source Apache Software License 2, deployed on Maven Central Repository, downloadable as a jar and available on a Google Code Subversion server to be integrated the way you want.
Hope this helps,
Cyrille (Xebia)
I've used JMX to expose an MBean that will allow the adjusting of the Log4J Logger levels dynamically. This proved to be very useful for a clustered application where we did not want to have to modify the log4j configuration file on all nodes to change the log level for a specified logger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With