Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15232

Persisted AutoTimer doesn't pick up TimerConfig.info change

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 25.0.0.Beta1, 25.0.0.Final
    • 17.0.1.Final
    • EJB
    • None
    • Hide

      See Description, but in brief:

      Deploy bean with an auto timer with info 'a', then change the info to 'b' and redeploy the bean.  The timer info will remain 'a' and will not change to 'b' until such time as persisted timers are destroyed or some other change happens to the timer annotation that causes it to no longer match the persisted timer.

      Show
      See Description, but in brief: Deploy bean with an auto timer with info 'a', then change the info to 'b' and redeploy the bean.  The timer info will remain 'a' and will not change to 'b' until such time as persisted timers are destroyed or some other change happens to the timer annotation that causes it to no longer match the persisted timer.

    Description

      If an ear defines an ejb module that has within it for example a singleton timer bean with a method like so:

      @Schedule(hour="*", minute="*") 
      public void autoTimer() {}

      that has deployed/started/then persisted and changes to

      @Schedule(hour="*", minute="*", info="IDecidedToNameMyTimer") 
      public void autoTimer() {}

      in a subsequent deployment, the timer will not have the 'info' updated in the running timer.

      It's not entirely clear to me based on the spec that it should in fact update the 'info', but it's seems like the 'right' thing to do.  I'm uncertain whether it should count as a new auto timer and thus cancel the previously persisted one though, or whether the previously persisted one should update with the new 'info'.  I'm inclined to think the former is more correct.

      Note that I believe the issue is in the TimerServiceImpl.restoreTimers method where it is matching currently active and new auto timers, and appears to apply to all wildfly versions.

      Attachments

        Activity

          People

            cfang@redhat.com Cheng Fang
            elderthorin Thorin Linderholm (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: