Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using EJB Timer in WebSphere does not work concurrently

157 views
Skip to first unread message

Brian

unread,
Jul 28, 2010, 7:40:21 PM7/28/10
to
I have a WebSphere EJB 3.0, that is using a Timer (@Timeout)
annotation. I am starting the timer using the TimerService API from
WebSphere as shown below:

timerService.createTimer(startTime, intervalDuration, args);

The issue is that I have configured my Timer Manager in WebSphere to
10 (shown as "Number of Timer Threads") . From what I can tell that
should allow up to ten threads (OR Timers) to run concurrently. But
what happens is that only a single timer can run at any given time.

Consider the following two timers, both running with the same Timer
Manager that allows 10 threads:

Timer #1 - every minute, takes < 1 second to complete.
Timer #2 - every hour, takes 10 min to complete.

What I see is that the timer events just build up, such that timer #1
does not run while timer #2 is running - and even worse is that once
timer #2 completes timer #1 has a backup, and executes 10 calls as
soon as timer #2 finishes to clear the backlog of timers.

This seems like a bug, but I don't think Timers are a J2EE standard.
Any ideas would be good.

0 new messages