[jboss-jira] [JBoss JIRA] (WFLY-10584) Timer repeats uncontrolled

Jörg Bäsner (JIRA) issues at jboss.org
Mon Jun 18 06:19:00 EDT 2018


     [ https://issues.jboss.org/browse/WFLY-10584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörg Bäsner updated WFLY-10584:
-------------------------------
    Description: 
Given an hourly timer like this:

{code}
    @Schedule(hour = "*", persistent = false)
    public void hourlyTimer(Timer timer) {
        long methodEntryTime = System.currentTimeMillis();
        ZonedDateTime nextTimeout = ZonedDateTime.ofInstant(timer.getNextTimeout().toInstant(),
                ZoneId.systemDefault());
        logger.info("Call to hourly maintenance function completed in {} seconds, next timeout at {}",
                millis2secondsString(System.currentTimeMillis() - methodEntryTime), nextTimeout);
    }  
{code}

Results in the Timezone [Europe/Helsinki] on the 24th or March 2018 at 23:00:00 LocalTime in a next trigger of the same, see:

{noformat}
23:00:01,997 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 10) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
23:00:01,998 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 6) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
23:00:02,000 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 7) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
23:00:02,001 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 7) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
{noformat}

  was:
Given an hourly timer like this:

{code}
    @Schedule(hour = "*", persistent = false)
    public void hourlyTimer(Timer timer) {
        long methodEntryTime = System.currentTimeMillis();
        ZonedDateTime nextTimeout = ZonedDateTime.ofInstant(timer.getNextTimeout().toInstant(),
                ZoneId.systemDefault());
        logger.info("Call to hourly maintenance function completed in {} seconds, next timeout at {}",
                millis2secondsString(System.currentTimeMillis() - methodEntryTime), nextTimeout);
    }  
{code}

Results in the Timezone [Europe/Helsinki] on the 24th or March 2018 at 23:00:00 LocalTime in a next trigger of the same, see:

{noformat}
{{23:00:01,997 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 10) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
23:00:01,998 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 6) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
23:00:02,000 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 7) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
23:00:02,001 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 7) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]}}
{noformat}



> Timer repeats uncontrolled
> --------------------------
>
>                 Key: WFLY-10584
>                 URL: https://issues.jboss.org/browse/WFLY-10584
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: 13.0.0.Final
>            Reporter: Jörg Bäsner
>            Assignee: Jörg Bäsner
>
> Given an hourly timer like this:
> {code}
>     @Schedule(hour = "*", persistent = false)
>     public void hourlyTimer(Timer timer) {
>         long methodEntryTime = System.currentTimeMillis();
>         ZonedDateTime nextTimeout = ZonedDateTime.ofInstant(timer.getNextTimeout().toInstant(),
>                 ZoneId.systemDefault());
>         logger.info("Call to hourly maintenance function completed in {} seconds, next timeout at {}",
>                 millis2secondsString(System.currentTimeMillis() - methodEntryTime), nextTimeout);
>     }  
> {code}
> Results in the Timezone [Europe/Helsinki] on the 24th or March 2018 at 23:00:00 LocalTime in a next trigger of the same, see:
> {noformat}
> 23:00:01,997 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 10) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
> 23:00:01,998 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 6) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
> 23:00:02,000 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 7) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
> 23:00:02,001 INFO  [org.jboss.playground.PlaygroundAutoTimerBean] (EJB default - 7) Call to hourly maintenance function completed in 0 seconds, next timeout at 2018-03-24T23:00+02:00[Europe/Helsinki]
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jboss-jira mailing list