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

Recurring Timers are called concurrently

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 8.1.0.Final
    • Fix Version/s: 9.0.0.Alpha1
    • Component/s: EJB
    • Labels:
    • Steps to Reproduce:
      Hide

      Test case

      @Singleton
      @Lock(LockType.READ)
      @Startup
      public class MyScheduler {
          
          private static final Logger LOGGER = Logger.getLogger(MyScheduler.class.getName());
          
          @Schedule(hour = "*", minute = "*", second = "0/30")
          public void performOperation() {
              try {
                  String id = UUID.randomUUID().toString();
                  Object[] params = new Object[]{id,LocalDateTime.now(),Thread.currentThread().getName()}; 
                  LOGGER.log(Level.INFO,"Starting operation {0} at {1} in thread {2} ",  params);
                  long pause= Duration.ofMinutes(1).toMillis();
                  Thread.sleep(pause);
                  LOGGER.info("Done performing operation: " + id);
              } catch (InterruptedException ex) {
                  LOGGER.log(Level.SEVERE, null, ex);
              }
          }
          
          
      }
      
      Show
      Test case @Singleton @Lock(LockType.READ) @Startup public class MyScheduler { private static final Logger LOGGER = Logger.getLogger(MyScheduler. class. getName()); @Schedule(hour = "*" , minute = "*" , second = "0/30" ) public void performOperation() { try { String id = UUID.randomUUID().toString(); Object [] params = new Object []{id,LocalDateTime.now(), Thread .currentThread().getName()}; LOGGER.log(Level.INFO, "Starting operation {0} at {1} in thread {2} " , params); long pause= Duration.ofMinutes(1).toMillis(); Thread .sleep(pause); LOGGER.info( "Done performing operation: " + id); } catch (InterruptedException ex) { LOGGER.log(Level.SEVERE, null , ex); } } }

      Description

      According to https://docs.jboss.org/author/display/WFLY8/EJB+3+Reference+Guide recurring timers should not be executed concurrently.

      That is not the case. I don't think the current behavior is actually expected.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swd847 Stuart Douglas
                  Reporter:
                  cbarragan Carlos Barragan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: