Database Reference
In-Depth Information
Instrumentationrefers to putting a wrapper around application code that provides hooks from
the application to the JVM in order to allow the JVM to gather data that external tools can use.
Such tools include monitoring agents, data analysis tools, profilers, and more. JMX allows you
not only to view such data but also, if the application enables it, to manage your application at
runtime by updating values.
JMX is commonly used for a variety of application control operations, including:
▪ Low available memory detection, including the size of each graduation space on the heap
▪ Thread information such as deadlock detection, peak number of threads, and current live
threads
▪ Verbose classloader tracing
▪ Log level control
▪ General information such as application uptime and the active classpath
Many popular Java applications are instrumented using JMX, including the JVM itself, HP Open
View, Oracle WebLogic Server, the Glassfish application server, and Cassandra. In these applica-
tions, JMX is simply one way of managing the container; JBoss Application Server, on the other
hand, uses JMX as the primary way of interacting with the container.
For example, the WebLogic server provides a very wide range of activities via JMX. You can,
for example, monitor the number of available JDBC connections in a pool or see the number of
stateless session beans loaded in the container in a given state. Not only can you monitor these
things, but you can use a graphical console that ships with the Sun (now Oracle) JDK to change
their values. Want to increase the size of the pool of message-driven beans? A JMX-enabled
container could allow you to manage your resources in this way.
A depiction of the JMX architecture is shown in Figure 9-1 .
Search WWH ::




Custom Search