Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1926

two timers executing at the same time in some conditions

    XMLWordPrintable

Details

    Description

      This is the case of Stateless Session Bean implementing EJBTimedObject.

      When timer task is scheduled to be executed on the fixed interval, let's say 10 seconds and the task is executing for more than 10 seconds let's say 1 minute the scheduler doesn't start a new task every 10 seconds but waits for the execution to finish. This guarantees that only one task is executed at given time.

      But when task fails with an exception retry policy makes it retry the job while the task is still scheduled to be executed after fixed delay after failure. This causes the situation in which (in the case of long running task) the retry task is still executing and the next fire of the task starts executing. In result we have 2 tasks doing the same job executing at the same time with some time offset only. Is this situation correct?

      Attachments

        Activity

          People

            npahucki-novell Nathan Pahucki (Inactive)
            madGreg Grzegorz G?owaty (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified