File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes ejb3 timer services questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejb3 timer services questions" Watch "ejb3 timer services questions" New topic

ejb3 timer services questions

Johann Dobbins
Ranch Hand

Joined: Oct 16, 2008
Posts: 62
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?

thank you
Reza Rahman
Ranch Hand

Joined: Feb 01, 2005
Posts: 580

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
I agree. Here's the link:
subject: ejb3 timer services questions