[jboss-user] [EJB 3.0] - Recover timer after shutdown

galo.navarro do-not-reply at jboss.com
Fri Sep 1 11:37:20 EDT 2006


I have a simple EJB that creates a timer and handles the corresponding event when fired. 

	public void startTimer() {
  | 		System.out.println("Fired");
  | 		ctx.getTimerService().createTimer(new Date(new Date().getTime() + 10*60*1000), "It's me");
  | 	}
  | 
  | 	@Timeout
  | 	public void timeoutHandler(Timer timer) {
  | 		System.out.println("Expired: " + timer.getInfo());
  | 	}
  | 

If my Jboss server is shut down (or crashes) before the timer is due and restarted, I can still see the timer in the Timers table, but it's never fired. 

What do I need to do so those timers are still fired after my app server is restarted? 

Thanks a lot.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968951#3968951

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968951



More information about the jboss-user mailing list