[jboss-user] [EJB 3.0 Users] - Re: Timer not available

komet_1978 do-not-reply at jboss.com
Fri Oct 9 07:05:20 EDT 2009

"dimitris at jboss.org" wrote : Just by looking at your description, why not retrieving the active timers directly after the restart from the EJB that created them in the first place, they should be there? I don't think you need to store the handle.

The timers are managed by the timer service. I don't hold them in my EJB which is a STSB and has the timer service injected. My STSB is only a facade for the service and provides methods to create a timer, change a timer or cancel a timer.

I don't see any possibility to identify and access a certain timer by timerservice api. Of course I can get the whole list of active timers by calling timerService.getTimers(). But then I would have to iterate over the collection to find the timer instance I want to change. This isn't nice ;-).

TimerHandles are defined to provide a direct acess to a timer and as mentioned in the ejb3 specification a handle must be able to achieve that (chapter 18):

"The container must implement a timer handle to be usable over the lifetime of the timer."

This default behaviour of the timer table conflicts with the specification.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259592#4259592

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259592

More information about the jboss-user mailing list