tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jieryn <jie...@gmail.com>
Subject Re: EJB timers stop working.
Date Wed, 11 Feb 2015 16:29:21 GMT
I've seen this in production for quite a while, too, on Apache TomEE 1.7.1.

I've never been able to catch a log message which showed it, we end up
having to restart periodically in order to ensure the timers are
reactivated. I suspect this is a user error, but .. no log messages.
It's not easy to detect when something isn't running..

Is there some class name I can grep my logs for that would help?
Whatever the class that runs the @Scheduled @Singleton @Stateless
@Startup beans.

On Wed, Feb 11, 2015 at 9:48 AM, Matej <gmatej@gmail.com> wrote:
> 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

Mime
View raw message