• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB TimerService and Part 2

 
Kumar Amit
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
How to decide EJB TimerService should be used to solve a problem in the assignment? What are your thoughts?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need a timer? This isn't something someone on the internet is likely to be able to tell you.
 
Kumar Amit
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,
My question is NOT about whether I need a timer. My question is more generic i.e. when to use and when not to use EJB timers and one should look for other schedulers e.g. Quartz. For example
EJB Timer Services is not recommended to use for building real-time applications (mission critical applications), as the expiration may not happen accurately at all times because of certain factors like the network latency, underlying implementation etc.
 
Youssef Ben Kaddour El Wazzani
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Kumar Amit wrote:EJB Timer Services is not recommended to use for building real-time applications (mission critical applications), as the expiration may not happen accurately at all times because of certain factors like the network latency, underlying implementation etc.


For a banking application you are probably right, but for something like room reservations, a simple timer which will change the rooms status to free if the reservation is not confirmed should be enough.
I mention the reservations example because i remember seen it in the "Maning EJB 3" book, it's seemed reasonable, so as you sayed, it's depend on your assignement and where do you categorate it, is it need a more robust scheduling or not.
 
Kumar Amit
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Youssef. I agree with you that in the example you gave its probably ok to use EJB3 timer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic