2 Replies Latest reply on Nov 15, 2005 7:05 AM by alexserbul

    Phantom timeout

    phillycheese

      I'm having a strange problem where a ejbTimer() event is fired, even though no Timer was scheduled to go off at that time.

      This only seems to occur in the following scenario.
      I create a scheduled timer event to go off. At this point ejbTimeout() is called. WHILE processing is still going on inside the ejbTimeout() method, I cancel the timer and recreate a new one with the same name but at a different time.
      Then the ejbTimeout() call is complete.
      This is where the problem shows up. Immediately after ejbTimeout() is done,
      I get ANOTHER call to ejbTimeout(). This is my phantom ejbTimeout(). Where did it come from? Any guesses? It can't be the new one i created because i set that one for 24 hours ahead of time.

      Thanx

      Phil

        • 1. Re: Phantom timeout
          phillycheese

          my environment is jboss 4.0.2 (linux)
          Timer persistence is turned off in ejb-deployer.xml

          this seems to occur when I cancel and recreate a timer (essentially resetting the timer).

          When ejbTimeout() is called and completes, another call to ejbTimeout() occurs! Hence, I get 2 calls to ejbTimeout() when i really only want one.

          Help help

          Phil

          • 2. Re: Phantom timeout
            alexserbul

            This situation is described in timers section if EJB2.1 spec. Look there.