https://issues.apache.org/jira/browse/TOMEE-1181
Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-04-17 14:49 GMT+02:00 Romain Manni-Bucau <[email protected]>: > Hi > > this is not yet supported, we can add it for sure. > > > Romain Manni-Bucau > Twitter: @rmannibucau > Blog: http://rmannibucau.wordpress.com/ > LinkedIn: http://fr.linkedin.com/in/rmannibucau > Github: https://github.com/rmannibucau > > > 2014-04-17 13:44 GMT+02:00 Olivier Paquet <[email protected]>: >> Hi, >> >> I implemented an MBean exactly as described in the doc >> (http://tomee.apache.org/examples-trunk/mbean-auto-registration/README.html) >> and then I implemented additionally the MBeanRegistration that can be used >> to intercept the MBean lifecycle. >> On TomEE start the MBean is deployed adn I can clal the method via JMX. --> >> OK >> >> But the lifecycle method are never invoked, did I forgot something? >> >> @MBean >> @Description("play with me to guess a number") >> public class ConfigServiceMbean implements MBeanRegistration { >> private static Logger log = >> Logger.getLogger(ConfigServiceMbean.class); >> >> @Override >> public ObjectName preRegister(MBeanServer server, ObjectName name) >> throws Exception { >> log.debug("preRegister"); >> return null; >> } >> >> @Override >> public void postRegister(Boolean registrationDone) { >> log.debug("postRegister"); >> } >> >> @Override >> public void preDeregister() throws Exception { >> log.debug("preDeregister"); >> >> } >> >> @Override >> public void postDeregister() { >> log.debug("postDeregister"); >> >> } >> >> @ManagedOperation >> public String invokeService() { >> log.debug("invokeService() invoked"); >> return "OK"; >> } >> >> } >> >> I could not find any issue about the usage of the MBeanRegistration >> interface, any known issues about that? >> >> >> Thanks, >> >> Olivier >> >> >> >> -- >> View this message in context: >> http://openejb.979440.n4.nabble.com/MBean-implements-MBeanRegistration-but-lifecycle-methods-are-never-called-tp4668863.html >> Sent from the OpenEJB User mailing list archive at Nabble.com.
