Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-827

creating timers inside start() creates duplicate timers.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • AS 4.2.1.GA
    • EJB 3.0 RC9 - FD
    • None
    • None

      Calling ctx.getTimerService().createTimer(...) within the start() method of a managed service bean creates duplicate timers. In other words, I have a bean which is both @Management and @Service which has a method which is @Timeout. In the start method of the bean (when the bean is deployed) I create a new timer. But then the method marked @Timeout is called twice. When I investigate the timers in by calling ctx.getTimerService().getTimers(), I find there are actually 2 timers with different ids, but with the exact same info.

      I have attached an example. You will see the start() method getting called once when the bean is deployed, but then the timeout method getting called twice.

              wdecoste1@redhat.com William Decoste (Inactive)
              ngtdave David Owens (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: