Custom JMX MBeans can be added to Geode members. They can be federated but not aggregated in the JMX manager. This means individual members MBean data can be retrieved from the JMX manager but the values from all the members cannot be combined in one bean.
The steps to create and register a new Geode JMX MBean are:
- Define MXBean interface
- Implement MXBean interface with MBean class
- Register the MBean
- Federate the MBean
Define MXBean interface
The MXBean interface provides the JMX bean's attributes and operations.
Implement MXBean interface with MBean class
The MBean class provides the implementation of the MXBean.
Register the MBean
Registering the MBean causes the MBean to be available to JMX clients of the member. See below for code sample.
Federate the MBean
Federating the MBean causes the MBean to be registered in the JMX manager's MBeanServer which in turn causes the MBean to be available to JMX clients of the JMX manager. In addition, it causes the current values of the MBean's attributes to be periodically sent to the JMX manager.
Note: The JMX manager requires the CustomMXBean interface to be on its classpath.
In jconsole, the MBean will be available like: