-
1. Re: recurring timer and app re-start issue
wolfc Apr 19, 2007 2:50 AM (in response to ajay662)Timers are persisted on undeployment and restored upon deployment.
http://jira.jboss.com/jira/browse/EJBTHREE-630 -
2. Re: recurring timer and app re-start issue
ajay662 Apr 19, 2007 8:58 AM (in response to ajay662)Exactly. So the persisted state should be that initial timer has been delivered. And hence when I re-start jboss initial timer should not be re-delivered.
-
3. Re: recurring timer and app re-start issue
wolfc Apr 20, 2007 3:33 AM (in response to ajay662)How did you create the recurring timer?
Do you check whether there is already a timer active? -
4. Re: recurring timer and app re-start issue
ajay662 Apr 20, 2007 4:52 PM (in response to ajay662)I created the timer on a freshly installed jboss instance (so no prior timers) using the code below:
timer = messageDrivenCtx.getTimerService().createTimer( job.getFirstSchedTime(), job.getRecurringInterval(), job);
Here recurring-interval is 1 hour (in milliseconds). After I got my first timer callback I restarted the server and saw the timer calback right away on restart. Multiple restarts of the server showed the same behavior.
This is 100% reproducible. -
5. Re: recurring timer and app re-start issue
ajay662 May 4, 2007 2:48 PM (in response to ajay662)Nobody else is experiencing this??
This is a major problem. I have a bunch of tasks scheduled to do nightly maintenance on my devices at 1pm every night. So I am using a recurring timer to schedule these. Everything works as expected if I keep my application running. But if have to re-start my application for any reason, all those timers get fired right away..