glassfish
  1. glassfish
  2. GLASSFISH-10817

Method getTimers (object javax.ejb.TimerService) return empty collection after server restart

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: v2.1
    • Fix Version/s: v2.1.2
    • Component/s: ejb_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      10,817
    • Status Whiteboard:
      Hide

      v3_exclude

      Show
      v3_exclude

      Description

      In my session stateless bean (EJB3), there is "injected" object TimerService
      (@Resource TimerService timerService. I use method timerService.createTimer in
      the bussiness mnethod implementation. The method TimerSerrvice.getTimers return
      expected results till restart Glassfish server. Method TimerService.getTimers
      return empty collection after Glassfish server restart.

        Activity

        Hide
        ksak added a comment -

        Assign to Marina

        Show
        ksak added a comment - Assign to Marina
        Hide
        marina vatkina added a comment -

        On v2.1 it works correctly, but on v3 something had changed so that the timers
        are not restored

        Show
        marina vatkina added a comment - On v2.1 it works correctly, but on v3 something had changed so that the timers are not restored
        Hide
        janouskovec added a comment -

        I'm using v2.1. I think, that it doesn't work correctly in this version. It
        seems that the timers are rescheduled (restored) after server restart, but
        method TimerService.getTimers() return empty collection after Glassfish server
        restart.

        Show
        janouskovec added a comment - I'm using v2.1. I think, that it doesn't work correctly in this version. It seems that the timers are rescheduled (restored) after server restart, but method TimerService.getTimers() return empty collection after Glassfish server restart.
        Hide
        marina vatkina added a comment -

        may be you are asking in a different bean? The method returns (see javadoc) "all
        the active timers associated with this bean."

        I'll attach the test case that I used. To create timers use url:
        http://localhost:8080/web/MyServlet to test before and after restart:
        http://localhost:8080/web/MyServlet1

        Show
        marina vatkina added a comment - may be you are asking in a different bean? The method returns (see javadoc) "all the active timers associated with this bean." I'll attach the test case that I used. To create timers use url: http://localhost:8080/web/MyServlet to test before and after restart: http://localhost:8080/web/MyServlet1
        Hide
        marina vatkina added a comment -

        Created an attachment (id=3769)
        test case

        Show
        marina vatkina added a comment - Created an attachment (id=3769) test case
        Hide
        marina vatkina added a comment -

        v3 issue is separate

        Show
        marina vatkina added a comment - v3 issue is separate
        Hide
        janouskovec added a comment -

        You are right. In v2 works TimerService correctly after server restart. Method
        TimerService.getTimers() return empty collection only when the application is
        redeployed- it was my problem probably.

        Show
        janouskovec added a comment - You are right. In v2 works TimerService correctly after server restart. Method TimerService.getTimers() return empty collection only when the application is redeployed- it was my problem probably.
        Hide
        marina vatkina added a comment -

        I'm glad we sorted things out

        Show
        marina vatkina added a comment - I'm glad we sorted things out

          People

          • Assignee:
            marina vatkina
            Reporter:
            janouskovec
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: