Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14921

[GSS](7.1.z) Problem with @Schedule and daylight-saving time

    XMLWordPrintable

Details

    • Hide

      1. Deploy this little Bean to a Wildfly 12:

      import java.util.logging.LogManager;
      import java.util.logging.Logger;
      
      import javax.ejb.Schedule;
      import javax.ejb.Singleton;
      import javax.ejb.Startup;
      
      @Startup
      @Singleton
      public class TestBean {
        private static final Logger logger = LogManager.getLogManager().getLogger(TestBean.class.getName());
      
        @Schedule(second = "*/10", minute = "*", hour = "*", persistent = false)
        void scheduledUpdate() {
          logger.info("Time is up!");
        }
      }
      

      2. Set your system date time to 24.03.2018 23:59:00
      3. Start your Wildfly 12

      What you now should see is something like the following output in the log:

      ...
      2018-03-24 23:59:17,173 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
      2018-03-24 23:59:17,173 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
      2018-03-24 23:59:17,173 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 12.0.0.Final (WildFly Core 4.0.0.Final) started in 3392ms - Started 435 of 625 services (314 services are lazy, passive or on-demand)
      2018-03-24 23:59:20,013 INFO  [TestBean] (EJB default - 1) Time is up!
      2018-03-24 23:59:30,008 INFO  [TestBean] (EJB default - 2) Time is up!
      2018-03-24 23:59:40,010 INFO  [TestBean] (EJB default - 3) Time is up!
      2018-03-24 23:59:50,010 INFO  [TestBean] (EJB default - 4) Time is up!
      2018-03-24 23:59:50,010 WARN  [org.jboss.as.ejb3.timer] (EJB default - 5) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:00:00 CET 2018 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018.
      2018-03-24 23:59:50,012 WARN  [org.jboss.as.ejb3.timer] (EJB default - 7) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:00:20 CET 2018 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018.
      2018-03-24 23:59:50,013 INFO  [TestBean] (EJB default - 6) Time is up!
      2018-03-24 23:59:50,014 WARN  [org.jboss.as.ejb3.timer] (EJB default - 9) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:00:40 CET 2018 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018.
      2018-03-24 23:59:50,014 INFO  [TestBean] (EJB default - 8) Time is up!
      2018-03-24 23:59:50,014 WARN  [org.jboss.as.ejb3.timer] (EJB default - 1) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:01:00 CET 2018 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018.
      2018-03-24 23:59:50,014 INFO  [TestBean] (EJB default - 10) Time is up!
      2018-03-24 23:59:50,014 WARN  [org.jboss.as.ejb3.timer] (EJB default - 2) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:01:10 CET 2018 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018.
      2018-03-24 23:59:50,014 WARN  [org.jboss.as.ejb3.timer] (EJB default - 5) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:01:30 CET 2018 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018.
      2018-03-24 23:59:50,014 INFO  [TestBean] (EJB default - 3) Time is up!
      2018-03-24 23:59:50,014 WARN  [org.jboss.as.ejb3.timer] (EJB default - 4) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:01:40 CET 2018 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018.
      2018-03-24 23:59:50,014 WARN  [org.jboss.as.ejb3.timer] (EJB default - 6) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:02:00 CET 2018 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018.
      2018-03-24 23:59:50,014 INFO  [TestBean] (EJB default - 7) Time is up!
      ...
      
      Show
      1. Deploy this little Bean to a Wildfly 12: import java.util.logging.LogManager; import java.util.logging.Logger; import javax.ejb.Schedule; import javax.ejb.Singleton; import javax.ejb.Startup; @Startup @Singleton public class TestBean { private static final Logger logger = LogManager.getLogManager().getLogger(TestBean. class. getName()); @Schedule(second = "*/10" , minute = "*" , hour = "*" , persistent = false ) void scheduledUpdate() { logger.info( "Time is up!" ); } } 2. Set your system date time to 24.03.2018 23:59:00 3. Start your Wildfly 12 What you now should see is something like the following output in the log: ... 2018-03-24 23:59:17,173 INFO [org.jboss.as] (Controller Boot Thread ) WFLYSRV0060: Http management interface listening on http: //127.0.0.1:9990/management 2018-03-24 23:59:17,173 INFO [org.jboss.as] (Controller Boot Thread ) WFLYSRV0051: Admin console listening on http: //127.0.0.1:9990 2018-03-24 23:59:17,173 INFO [org.jboss.as] (Controller Boot Thread ) WFLYSRV0025: WildFly Full 12.0.0.Final (WildFly Core 4.0.0.Final) started in 3392ms - Started 435 of 625 services (314 services are lazy, passive or on-demand) 2018-03-24 23:59:20,013 INFO [TestBean] (EJB default - 1) Time is up! 2018-03-24 23:59:30,008 INFO [TestBean] (EJB default - 2) Time is up! 2018-03-24 23:59:40,010 INFO [TestBean] (EJB default - 3) Time is up! 2018-03-24 23:59:50,010 INFO [TestBean] (EJB default - 4) Time is up! 2018-03-24 23:59:50,010 WARN [org.jboss.as.ejb3.timer] (EJB default - 5) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?: true persistent?: false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration= null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:00:00 CET 2018 timerState=IN_TIMEOUT info= null ] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018. 2018-03-24 23:59:50,012 WARN [org.jboss.as.ejb3.timer] (EJB default - 7) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?: true persistent?: false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration= null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:00:20 CET 2018 timerState=IN_TIMEOUT info= null ] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018. 2018-03-24 23:59:50,013 INFO [TestBean] (EJB default - 6) Time is up! 2018-03-24 23:59:50,014 WARN [org.jboss.as.ejb3.timer] (EJB default - 9) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?: true persistent?: false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration= null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:00:40 CET 2018 timerState=IN_TIMEOUT info= null ] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018. 2018-03-24 23:59:50,014 INFO [TestBean] (EJB default - 8) Time is up! 2018-03-24 23:59:50,014 WARN [org.jboss.as.ejb3.timer] (EJB default - 1) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?: true persistent?: false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration= null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:01:00 CET 2018 timerState=IN_TIMEOUT info= null ] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018. 2018-03-24 23:59:50,014 INFO [TestBean] (EJB default - 10) Time is up! 2018-03-24 23:59:50,014 WARN [org.jboss.as.ejb3.timer] (EJB default - 2) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?: true persistent?: false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration= null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:01:10 CET 2018 timerState=IN_TIMEOUT info= null ] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018. 2018-03-24 23:59:50,014 WARN [org.jboss.as.ejb3.timer] (EJB default - 5) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?: true persistent?: false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration= null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:01:30 CET 2018 timerState=IN_TIMEOUT info= null ] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018. 2018-03-24 23:59:50,014 INFO [TestBean] (EJB default - 3) Time is up! 2018-03-24 23:59:50,014 WARN [org.jboss.as.ejb3.timer] (EJB default - 4) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?: true persistent?: false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration= null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:01:40 CET 2018 timerState=IN_TIMEOUT info= null ] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018. 2018-03-24 23:59:50,014 WARN [org.jboss.as.ejb3.timer] (EJB default - 6) WFLYEJB0043: A previous execution of timer [id=2cb6b3c6-fdc8-468a-806c-a0699237db21 timedObjectId=TestWeb.TestWeb.TestBean auto-timer?: true persistent?: false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@2cd27b36 initialExpiration= null intervalDuration(in milli sec)=0 nextExpiration=Sat Mar 24 23:02:00 CET 2018 timerState=IN_TIMEOUT info= null ] is still in progress, skipping this overlapping scheduled execution at: Sat Mar 24 23:59:50 CET 2018. 2018-03-24 23:59:50,014 INFO [TestBean] (EJB default - 7) Time is up! ...

    Description

      The method anotated with @Schedule is executed repeatedly just before entering the day of daylight-saving time.

      Attachments

        Issue Links

          Activity

            People

              thofman Tomas Hofman
              rhn-support-jbaesner Joerg Baesner
              Daniel Cihak Daniel Cihak
              Daniel Cihak Daniel Cihak
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: