The new Event Service that is part of version 2.0 of the JMX API is available in the latest snapshot of the JDK 7 platform. The package description for the package summarizes what it is for and how to use it.

The description there starts like this:

This package defines the Event Service, which provides extended support for JMX notifications.

The Event Service provides greater control over notification handling than the default technique using MBeanServer.addNotificationListener or MBeanServerConnection.addNotificationListener.

Here are some reasons you may want to use the Event Service:

  • To receive notifications from a set of MBeans defined by an ObjectName pattern, such ascom.example.config:type=Cache,*.
  • When the notification-handling behavior of the connector you are using does not match your requirements. For example, with the standard RMI connector you can lose notifications if there are very many of them in the MBean Server you are connected to, even if you are only listening for a small proportion of them.
  • To change the threading behavior of notification dispatch.
  • To define a different transport for notifications, for example to arrange for them to be delivered through the Java Message Service (JMS). The Event Service comes with one alternative transport as standard, a "push-mode" RMI transport.
  • To handle notifications on behalf of MBeans (often virtual) in a namespace.

The Event Service is new in version 2.0 of the JMX API, which is the version introduced in version 7 of the Java SE platform. It is not usually possible to use the Event Service when connecting remotely to an MBean Server that is running an earlier version.

As with everything else in the new JMX API, we're always keen on hearing feedback, which you can add as a comment here or send to

The principal designer of the new Event Service is Shanliang Jiang, and he'll probably have some interesting things to say about it, which I'll link to from here.

[Tags: jmx jdk7.]