-
Enhancement
-
Resolution: Done
-
Major
-
None
-
User Experience
Timers which are persistent need to resume if the timeout is missed, i.e. if the server was down.
The EJB specification say by ยง13.2:
"In the event of a container crash or container shutdown, the timeout callback method for a persistent timer that has not been cancelled will be invoked on a new JVM when the container is restarted or on another JVM instance across which the container is distributed. This rule applies to both programmatically or automatically created persistent timers."
The understanding is not clear and can be
- resume ALL missed timeouts
- resume but fire the timer only once
As Wildfly prevent from having the same timeout running concurrent a server start will have the effect that multiple timeouts are fired (assume you have a timer scheduled for every second and the server is down for minutes) but only the first (or a couple) will efectively executed all other will 'only' burden the server and log warn/error messages.
The effect for the server start is a slower startup, long list of log messages and no real benefit!
If the spec is really unclear here a configuration flag should be added to control that behaviour (like done for ejb invocation in-vm calls - byReference/byValue)
The current behaviour should be the default but a boolean attribute should allow to fire the timer only once and set the next timeout according to the schedule (recurring or calendar) in the future.
- relates to
-
WFLY-19361 EJB timer executed before the @PostConstruct of a @Singleton @Startup bean has finished with HA profile
- Resolved