There's a plugin for NetBeans that supports the JMX API. It allows you to create and modify JMX MBeans through a wizard, to create unit tests for them, and to run an application and simultaneously attach to its JMX instrumentation.
Ron Bodkin has written an excellent, detailed
article about using the
Inspector project. This combines AspectJ and JMX
technologies to add monitoring to applications in a clean and
Descriptors allow you to give additional information about
MBeans to management clients. For example, a Descriptor on an
MBean attribute might say what units it is measured in, or what
its minimum and maximum possible values are. As of Mustang
(Java SE 6), Descriptors are a basic part of the JMX API and are
available in all types of MBeans.
The Tiger JDK introduced a nifty feature whereby you could run an application with
-Dcom.sun.management.jmxremote and then later connect to it using the jconsole tool. That allows you to see the JVM's instrumentation (memory, classes, threads) plus any JMX instrumentation you've defined yourself.
comment on my last entry,
One thing that struck me about MXBeans is that they are
really fusion of standard MBeans and OpenMBeans, since they only
use standard types. However they don't actually conform to
Summer is of course the time when people take their vacation,
and nowhere more so than here in France.
The Java SE sources are downloadable from java.net, and you can
change and extend them within the constraints of the relevant
licenses. But building the whole of Java SE is a major
undertaking. Here's how to build just the JMX API. The same
ideas would apply to building other subsets of Java SE that are
The consistently excellent Brian Goetz has written a new article in his Java Theory and Practice series entitled "Be a good (event) listener". Since listeners are an important part of the JMX API, here's how his advice applies there.
With a Standard MBean, you define the management interface of
the MBean using a Java interface. Getters and setters in the
interface define attributes, and other methods define operations.
But the only information extracted out of the interface is the
names and types of the attributes and operations, and just the
types of the operation parameters.