3 Replies Latest reply on Apr 12, 2006 2:50 PM by dimitris

    TimerService problems after crash

    yankee

      Hi,

      as far as I know JBoss (using 4.0.3RC1 on Windows XP at the moment) restores the ejb timers after a crash. But there are 2 problems occuring after such a crash situation:

      1. the timers are still available after a crash and restart of JBoss but the formerly assigned timerInfo object (getInfo()) is null for these restored timers when they fire the ejbTimeout method.

      2. the method getTimers() of TimerService returns an empty collection although the timers have "survived" the crash.

      I used timers for a stateless session bean and created them with different timerInfos. The timerinfo was a Serializable Object containing 2 Strings.

      Has anybody else seen this behavior?

      Thanx in advance

        • 1. Re: TimerService problems after crash
          yankee

          Hi,

          I've just noticed that the mentioned problems occur only when using not simple Java Objects as timerInfo.

          During restart JBoss shows the following Error Message:

          09:18:08,078 ERROR [GeneralPurposeDatabasePersistencePlugin] Cannot deserialize java.lang.ClassNotFoundException: No ClassLoaders found for: tester.MyTimerInfo

          But this class can't be there coz the jar file containing this class (tester.MyTimerInfo) are deployed after this message during JBoss startup.

          So it seems JBoss has a bug in this case and has to deserialize after deploying all jars.

          • 2. Re: TimerService problems after crash
            yankee

            Hi,

            I'm new to this JBoss forum and would like to know where I can track the above mentioned timerservice bug officially to be fixed in the next version of JBoss.

            Thanx in advance


            • 3. Re: TimerService problems after crash
              dimitris

              1) As of jboss v4.0.4RC1, timers are persistent, so they will survive a crash but they'll also be there when you redeploy your ejb, if they are not expired or cancelled: http://jira.jboss.com/jira/browse/JBAS-1091

              2) this would also solve the missing timer info classes issue, since the restoration of the timers in now done at container start() not create() (i.e. later)

              3) Try the latest 4.0.4.CR2 and see if that works for you. If you still have a problem reopen the JIRA issue.