JMX Features
A Management Client (as well as any MBean) can
JMX Features
*Register MBeans with the MBeanServer (i.e. add them to the MBean repository).
*Create and register an MBean with the MBeanServer.
*Remove an MBean from the MBeanServer.
*View the published methods of an MBean (these methods are called Operations and Attributes), along with a description of each published method.
*Invoke the published methods of an MBean.
Receive notifications when an MBean triggers or throws an event (which is just like throwing a Throwable).
List (a.k.a. "query") subsets of MBeans using JMX domains, wildcards and/or name/value attribute pairs.
Create, initialize and register MBeans by specifying the class file location and initialization parameters in an Mlet file.
Generate JMX notifications with a Timer Service.
Enforce and maintain relationships (like one-to-many) of subsets of MBeans.
Control local and remote access to MBeans.
Precise control and fine-tuning of class loading.
*Remote JMX Clients that work just like Local JMX Clients after you get a MBeanServerConnection of an MBeanServer.
This document explains only the asterisked * features above. The other features are not explained due to the following reasons.
I cover MBean name search/queries trivially because that's all that is needed. If you want complex search capabilities, you can do much better with existing Java mechanisms than the poorly designed JMX query mechanisms.
Narrowing down subsets of MBeans with JMX-specific methods is easy to figure out from the API, and I have yet to run across a case where an application would suffer by retrieving all of the MBean names and using Java 1.0 features to choose the names that you want.
Notifications are definitely important for dynamic applications with inter-relations among MBeans. Most importantly, to update persistent storage upon MBean removal or registration. Originally, I didn't give high priority to documenting them since the early R.I. releases didn't fully implement it, and not until recently did Sun provide examples for them. I do intend to document Notifications when I have time.
Sun's Mlets aren't working right for me any more, and the error handling is REALLY BAD. Every substantial JMX product I have seen uses their own method for loading MBeans from a xml file list. Since most people are not satisfied with Mlets, I recommend that, if you want to load MBeans from a file list, you see what your JMX product or JMX distribution has to offer.
Timer Service and relationship control are not covered by Sun's examples or tutorials, and I get the feeling that these features may change in the future. I am also not convinced that the goals of these features are not handled better by other existing technologies.
Access control and class loading are advanced features that are explained adequately in the main JMX Spec.