I just thought I could create an extention to the XMBean descriptor to allow for declarative handling of JMX subscription notification, ala
org.jboss.system.NotificationListenerMBeanSupport.
(see http://www.jboss.org/wiki/Wiki.jsp?page=SubscriptionList)
The target resource (POJO) would just have to implement
javax.management.NotificationListener (i.e. the handleNotification() method).
In the XMBean descriptor you could write something like:
... <subscriptions> <dynamic>true</dynamic> <subscribe-after>start<subscribe-after> <unsubscribe-before>stop</unsubscribe-before> <subscription-list> <mbean name="JMImplementation:type=MBeanServerDelegate"> <notification type="JMX.mbean.registered"/> </mbean> <subscription-list> <subscriptions> ...