-
Bug
-
Resolution: Done
-
Major
-
18.0.1.Final, 22.0.1.Final
-
None
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.