Posted by emcmanus
on September 30, 2008 at 3:01 AM PDT
The JMX Namespace feature has now been integrated into the JDK 7 platform. You can read about it in detail in the online documentation for javax.management.namespace. Here's my quick summary. ...
The JMX Namespace feature has now been integrated into the JDK 7 platform . You can read about it in detail in the online documentation for javax.management.namespace . Here's my quick summary.
Namespaces add a hierarchical structure to the JMX naming scheme. The easiest way to think of this is as a directory hierarchy. Previously JMX MBeans had names like
java.lang:type=ThreadMXBean. Those names are still legal, but there can now also be names like
othervm "directory" is a
JMXNamespace . You create it by registering a
JMXNamespace MBean with the special name
othervm//:type=JMXNamespace. You specify its contents via the
sourceServer argument to the
JMXNamespace constructor .
There are three typical use cases for namespaces. First, if you have more than one MBean Server in the same Java VM (for example, it is an app server, and you have one MBean Server per deployed app), then you can group them all together in a higher-level MBean Server. Second, if you have MBean Servers distributed across different Java VMs (maybe on different machines), then again you can group them together into a "master" MBean Server. Then clients can access the different MBean Servers without having to connect to each one directly. Finally, namespaces support "Virtual MBeans", which do not exist as Java objects except while they are being accessed.
There's much more to namespaces than I've described here. Daniel Fuchs is the engineer who did most of the design and implementation work on namespaces, and I expect he will have more to say about them in the near future on his blog .