[jboss-dev-forums] [Design of POJO Server] - JMX Notification support

scott.stark@jboss.org do-not-reply at jboss.com
Wed Feb 28 14:21:31 EST 2007


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();
  |       }
  | 
  | 

This really should be a post invocation aspect described by a pointcut on the reconfigure method. Wiring this together would seem to need a deployer in conjunction with the JMXIntroduction.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023893#4023893

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023893



More information about the jboss-dev-forums mailing list