This content has been marked as final.
Show 2 replies
-
1. Re: Clean Shutdown of MBean
dimitris Nov 4, 2004 4:13 AM (in response to vbatista)Haven't used the Scheduler but looking at the code quickly it seems the execution thread is that of the jmx Timer, and it's not very obvious if it does a clean shutdown (it creates daemon thread by default, though).
So, do you get a clean shutdown?
If not, you can try to synchronize your serviceStop() with e.g. a Boolean shutdown flag inside your MBean. You doSomething() will also synchronise on that and make sure also it is not set (in case a call comes after serviceStop() has been called). -
2. Re: Clean Shutdown of MBean
vbatista Nov 4, 2004 10:17 AM (in response to vbatista)Thanks Dimitris!
I have it working according to your suggestion!! I had to override the stopService() method with a synchronized boolean variable.
Regards,
Victor Batista