Since notifications are part of the jmx interface the JMXIntroduction should be handling this. The question is how? I ran into this issue when looking to pojoize the Log4jService so that I could configure it properly during the bootstrap. It has a hard-coded notification generated when ever it reconfigures the log4j layer:
protected void emitReconfigureNotification() { // emit a reconfigure notification with the configURL Notification n = new Notification(RECONFIGURE_NOTIFICATION_TYPE, this, getNextNotificationSequenceNumber(), "Log4j subsystem reconfigured"); n.setUserData(configURL); super.sendNotification(n); } ... private void reconfigure(final URLConnection conn) { log.debug("Configuring from URL: " + configURL); ... // notify other mbeans that might be interested emitReconfigureNotification(); }
The simplest implementation is to just extend NotificationBroadcasterSupport
which will be picked up when you introduce the JMX aspect.
But as you say, this type of thing should really be done with an AOP introduction.