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

ManagedScheduledExecutorService keeps executing tasks after an exception is thrown

    XMLWordPrintable

Details

    Description

      There is apparently a bug in the implementation of the ManagedScheduledExecutorService, more specifically when using the inherited method of the ScheduledExecutorService, scheduleWithFixedDelay. On its javadoc it is stated "If any execution of the task encounters an exception, subsequent executions are suppressed.".

      When this code is executed in any Wildfly from 10 to 18, the task is kept alive in the scheduler after an exception is thrown and subsequent calls will happen anyway, contradicting the javadoc.

      To add evidences of a misbehavior, I did two extra checks:

      1. Running the exact same code in another JavaEE server (Payara);
      2. Using plain JavaSE with the ScheduledExecutorService.

      In both cases, after an exception being thrown, subsequent executions of it are - as the javadoc states - suppressed.

      Attachments

        Activity

          People

            rhn-cservice-bbaranow Bartosz Baranowski
            viniciusfk@hotmail.com Vinicius Kopcheski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: