-
1. Re: TimerService.getTimers () returns an empty collection. Is it a bug?
sfcoy Feb 29, 2012 7:37 AM (in response to negora)That call will only return timers associated with the bean into which the TimerService was injected.
ie. the bean containing the
{code:java}@Resource
private TimerService timerService;{code}
must also contain a method marked up with @Timeout.
If that's the case then you must also be sure that the timer has not expired.
-
2. Re: TimerService.getTimers () returns an empty collection. Is it a bug?
negora Feb 29, 2012 1:35 PM (in response to sfcoy)Stephen Coy wrote:
That call will only return timers associated with the bean into which the TimerService was injected.
Oh my bad! :S I didn't remember that, when I migrated my application to JBoss AS 7, I also changed the place where I queried the TimerService. Indeed, I was querying for a Timer into a different bean from where I created it (believing that timers where "shared" among classes of the same EJB application). Obviosuly, in JBoss AS 5 it worked because I instantiated and queried in the same bean.
Thank you a lot .