Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejb3 timer services questions

 
Johann Dobbins
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Johann,

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.

Regards,
Reza
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic