4 Replies Latest reply on Nov 7, 2006 9:51 AM by Jeremy

    Recover timer after shutdown

    Galo Newbie

      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.