• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Timer service question

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic