• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Timer service question

 
Martin Zisler
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I've some doubts concerning timer service.
Does it make sense that the very same piece of logic (class) registers an event and handles an event? From my point of view a separation would be much better, something like a table of pending events and some MDBs reacting on and handling the events.
What's your opinion to that? For me the timer service looks very weak ...
Thanks and kind regards, Martin
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you rephrase your question or give an example? I don't understand what you mean.

EJB Timer Service is a lightweight scheduling service.
 
Martin Zisler
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was just surprised that the event registrar and the event executor is expected to be the very same bean, which appears strange to me. This doesn't sound like very clear design. I'd expect some logic to register an event and some other logic to execute the event when it occurs ...
However, I found in the EJB 3.1 JSR that this point is expected to be improved in EJB 3.1 (http://jcp.org/en/jsr/detail?id=318)
EJB Timer Service enhancements to support cron-like scheduling, deployment-time timer creation, and stateful session bean timed objects.

Thanks anyway for your reply, Martin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic