|Federated MBean Architecture / GemFire XD JMX MBean Notifications|
All notifications emitted from managed nodes are federated to all JMX Managers in the system.
These notifications are federated and then emitted by the DistributedSystemMXBean. If you attach a javax.management.NotificationListener to your DistributedSystemMXBean, the NotificationListener can listen to notifications from all MemberMXBeans and all CacheServerMXBeans.
When you attach a notification listener to the DistributedSystemMXBean, the DistributedSystemMXBean then acts as the notification hub for the entire distributed system. You do not have to attach a listener to each individual member or cache server MBean in order to listen to all the notifications in the distributed system.The following is an example of attaching a NotificationListener to an MBean using the JMX MBeanServer API:
NotificationListener myListener = ... ObjectName mbeanName = ... MBeanServer.addNotificationListener(mbeanName, myListener, null, null);
System alerts are GemFire XD alerts wrapped within a JMX notification. The JMX Manager registers itself as an alert listener with each member of the system, and by default, it receives all messages logged with the SEVERE alert level by any node in the distributed system. Consequently, the DistributedSystemMXBean will then emit notifications for these alerts on behalf of the DistributedSystem.
By default, the JMX Manager registers itself to send notifications only for SEVERE level alerts. To change the alert level that the JMX Manager will send notifications for, use the DistributedMXBean.changeAlertLevel method. Possible alert levels to set are WARNING, ERROR, SEVERE, and NONE. After changing the level, the JMX Manager will only emit that level of log message as notifications.