tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis Monteiro <jlmonte...@tomitribe.com>
Subject Re: MBean implements MBeanRegistration but lifecycle methods are never called
Date Thu, 17 Apr 2014 14:45:41 GMT
Just committed few seconds again.
Thanks Olivier for reporting and Thanks Romain for providing the patch.

JLouis

   --
    Jean-Louis Monteiro
    http://twitter.com/jlouismonteiro
    http://www.tomitribe.com


On Thu, Apr 17, 2014 at 3:00 PM, Romain Manni-Bucau
<rmannibucau@gmail.com>wrote:

> 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 <rmannibucau@gmail.com>:
> > 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 <olivier.paquet@atos.net>:
> >> 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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message