Hi

how do you use TimerService? No log at all saying there is an issue?
What's @Timeout method?


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-11 15:48 GMT+01:00 Matej <gma...@gmail.com>:
> Hi all.
>
> In production under load, we experienced a case were a particular timer
> stopped working.
>
> I thought maybe a runstime exception stops a ScheduleExpression, but could
> not simulate this. Glassfish I know was very sensible to this.
>
> Could a low EJB timer thread seeting cause a timer to stop, working.
>
> We use tomee 1.7
>
> The timer is initialized like that.
>
> @Singleton
> @Lock(LockType.READ)
> @Startup
> public class CommEtaUpdateCacheTimer {
>
>     @Inject
>     private TimerScheduler scheduler;
>
>     @PostConstruct
>     public void doit() {
>         final ScheduleExpression schedule = new ScheduleExpression()
>                 .hour("*")
>                 .minute("*")
>                 .second("*/5");
>
>         scheduler.scheduleEvent(schedule, new
> CommEtaUpdateCacheTimerEvent());
>     }
>
>     public void observe(@Observes CommEtaUpdateCacheTimerEvent event) {
> /*
> processing code.
> */
>
>     }
>
>     public static class CommEtaUpdateCacheTimerEvent {
>     }
> }
>
> BR
>
> Matej

Reply via email to