-
1. Re: The real purpose of "refresh-interval" in EJB timer service (wildfly 10.1.0.Final)
wdfink Sep 12, 2017 7:47 AM (in response to wwang2016)If timers use the database as persistence, it might happen that node1 will add a timer (by deployment if scheduled, or programatic for any SLSB).
In this case the node2 is not aware of it.
So in case of node1 crashes the timer is not executed at node2 until the node refresh the timer from the persistence.
The refresh-interval can be used for this, you need to decide based on your potential risk.
Removed timers are not executed as they are updated on timeout before started, you'll see a message that the timer is cancled.
Make sense? Any further question?
-
2. Re: The real purpose of "refresh-interval" in EJB timer service (wildfly 10.1.0.Final)
wwang2016 Sep 12, 2017 8:44 AM (in response to wdfink)Hi Wolf-Dieter,
In the scenario you discussed, it is important to set this value to some number, instead of leave it as default (-1). The default value will make this parameter useless and it can be an issue in cluster environment.
In your experience, what would be a reasonable value?
Thanks,
Wayne
-
3. Re: The real purpose of "refresh-interval" in EJB timer service (wildfly 10.1.0.Final)
wdfink Sep 12, 2017 2:55 PM (in response to wwang2016)That depends on the requirements.
If you have timers running every let's say minute and it is important that you don't miss it you need to set something around a minute.
If you have timers which need only to be exact for the day you might choose a refresh of 0.5 to 1 day
-
4. Re: The real purpose of "refresh-interval" in EJB timer service (wildfly 10.1.0.Final)
wwang2016 Sep 13, 2017 8:53 AM (in response to wdfink)Thanks a lot!
Wayne