Scheduling operations in EJB application
Hello to everyone,
I programming an EJB application with JDK 1.7.0_u4 and I use Glassfish Open Source 3.1.2 as application server. I need an object to do some operations at regular time intervals. Actually I use Timer and TimerTask java class to achieve my goal scheduling an endless timer.
My problem is that these timers remains alive when I unload my application and a new one start when I redeploy my application. The only way to stop all these timer is to restart Glassfish.
Is there a manner to destroy any live timers at application start? Is there another way to achieve my goal? Is there any other technology to do same thing?
I found EJB timers, but at the moment I have no idea about them behavior.
Can anyone help me?
Thanks in advance.