1 Reply Latest reply on Jan 31, 2007 9:35 AM by Periklis Tsirakidis

    TimerService: Canceling Timer in stop()- of @Service

    Periklis Tsirakidis Newbie

      Hi,
      i am writing on a small service based on the @Service+@Management Features of EJB3. In this service i create via TimerService a new Timer in the start()-Method, which waits 10 minutes and invokes the @Timeout-Method every one hour. When i undeploy my service i invoke the timer cancelation in my Service's stop()-Method.

      As far as i understood, timers are getting persisted in a secondary storage, so that they are available even after a system crash. Hence i should expect, that when i cancel a timer this timer should also get removed also from the secondary storage. In my case they aren't getting removed.

      I am seeing this phenomenon in the jmx-console. During undeployment the timers listed in the section service=EJBTimerService per listTimers() are getting canceled and removed, but this is not the case in the section persistencePolicy=database,service=EJBTimerService.

      My system is based on:
      JBoss 4.0.5 GA
      EJB3+RC9+patch1
      MacOSX 10.4.8 with actual JVM 1.5