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

@Schedule EJB Timer not using timezone when calculating next timeout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.0.0.Final
    • 8.0.0.CR1
    • EJB
    • None

    Description

      With a system running in Central Timezone, if it uses the annotation below specifying the timezone as Eastern timezone, with the hour set to the current hour.
      The timer will fire once, and it will calculate the next timeout to be in the next hour CST, where as it should take in consideration the timezone specified on @Schedule which is Eastern. If it did, then the timer should continue to fire every minute.

        @Schedule(persistent = false, timezone = "America/New_York", dayOfMonth = "*", dayOfWeek = "*", month = "*", hour = "22", minute = "*", second = "0", year = "*")
      

      21:53:00,006 INFO [stdout] (EJB default - 1) ScheduleTest: nextTimeout:Wed Jan 29 22:00:00 CST 2014

      import javax.ejb.Schedule;
      import javax.ejb.Singleton;
      import javax.ejb.Startup;
      
      @Startup
      @Singleton
      public class ScheduleTest {
        @Schedule(persistent = false, timezone = "America/New_York", dayOfMonth = "*", dayOfWeek = "*", month = "*", hour = "22", minute = "*", second = "0", year = "*")
        public void helloWorld(Timer time) {
          System.out.println("ScheduleTest: timer:" + time.getClass().getName() + " " + time.getNextTimeout() + " " + time.getInfo());
        }
      }
      

      Attachments

        Activity

          People

            rhn-support-bmaxwell Brad Maxwell
            rhn-support-bmaxwell Brad Maxwell
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: