views:

481

answers:

4

This question is not about how JMX works or what JMX does. This question is about applications of JMX in 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 JEE services: database access (JDBC and JPA), session EJBs, JMS, web server, web services, AJAX-enabled services?

+2  A: 

My most common requirement is monitoring thread counts and memory. My most recent work involved heavily-threaded servers dispatching to grids, and it was important to monitor thread usage (a measure of how much dispatch work the server was undertaking). Memory is closely tied to the thread usage (partly because of the objects associated with each thread, partly because of the implicit stack allocation per thread).

We JMX-enabled our workload queue data as well. The above monitored symptoms or effects of queuing work items, but ultimately we wanted to monitor the actual queues of work. It's worthwhile to expose key components via JMX to get a clearer perspective on what's going on.

Brian Agnew
+1  A: 

On a previous project, we monitored thread counts and memory, number of HTTP sessions and size of query caches. The other interest of JMX with caches is that you can force a flush.

Gaël Marziou
+4  A: 

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.

Rob Smith
+1  A: 

A little OT but you can use JMX for quite a bit more. Currently I am using JMX to hot deploy / hot fix components. Dynamically add functionality to existing components (filter, etc.). JMX is good for communication between components on the same JVM. Every component I create is instrumented to use JMX.

Javamann
Could you please, give a link that would demonstrate usage of jmx for this purpose? - I am needing to use a feature of dynamically adding functionality to existing components.
techzen