In addition to How to Manage Coherence Using JMX, Coherence provides the ability to manage and monitor "custom MBeans" (i.e. application-level MBeans) within the Coherence JMX Management and Monitoring framework. This allows you to manage and/or monitor any application-level MBean from any JVM/node/end-point within the cluster.
In addition to the standard Coherence managed object types, any dynamic or standard MBean type may be registered using the com.tangosol.net.management.Registry interface.
Custom MBean Configuration
Coherence 3.4 can be configured to load platform and standard MBeans on connection to the cluster. This allows administrators and support personnel to update and view system and application information from all nodes in a cluster from a single location. This feature also eliminates the need for JMX programs to connect to multiple sources to gather information.
How to add a standard MBean to Coherence:
- Create a standard MBean.
- Add a standard MBean Class or jar to the Coherence classpath (including central management node).
- Create a Custom MBean XML file
- Modify node startup scripts to reference custom-mbean.xml.
How to programatically add a standard MBean to Coherence
Registry registry = CacheFactory.ensureCluster().getManagement();
Custom bean = new Custom();
String sName = registry.ensureGlobalName("type=Custom");
registry.register(sName, bean);
How to add a the results of a JMX Query to Coherence:
- Create a Custom MBean XML file
- Configure node startup script to include JMX MBean Server
- Configure node startup script to reference custom-mbean.xml
The following figure illustrates an example of a JMX Query.
