Using persistent and non-persistent timers
Timers can be either persistent or non-persistent. In this recipe, we will learn more about what persistence means and how to create either a persistent or non-persistent timer.
A persistent/non-persistent timer is created using the @Schedule annotation and setting its
persistent attribute to
true/false. If programmatic timers are being used, the
TimerConfig's setPersistent method is passed an argument of
Persistent timers are able to survive application and server crashes. When the system recovers, any persistent timers will be recreated and missed callback events will be executed. When replay of missed timer events is not desired, then a non-persistent timer should be used. For ...