so, i would like to create a timer service. i understand that this is simply a timed stateless session bean which performs some logic on every time out. which is great. but i have some questions:
how do i start the service? can it be set to start on deployment of my ear? also, what if it stops? is there some way i can test that its running and restart it if necessary?
posted 8 years ago
In EJB 3.1, you can have declarative timers that are triggered at deploy time. Right now, timers have to be triggered via an invocation (say from a Servlet context listener). Personally, I would use Quartz-EJB integration right now (which is very nice and easy to use, once you get the hang of Quartz). Also, some app-servers have proprietary EJB based timers/schedulers right now.
Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
It's just a flesh wound! Or a tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user