• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Timer scheduling granularity

 
Daniel Dor-Chay
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to schedule events using EJB Timers. The events should be scheduled every few seconds or minutes depending on the event type.
I know that we shouldnt be processing real time events with EJB Timers (which I guess is at the sub-second level), and the recommendation is to schedule events based on hours and days but nowhere does it talk about scheduling events based on the second level of granularity.
Has anyone done something like this before? Would there be any performance degradation at this level of granularity?

Thanks in advance for the help.
 
Colin Handy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Sun Application Server v8.1 sets the minimum time to 7000ms. This is set in domain.xml with the following:

"<ejb-timer-service max-redeliveries="1" minimum-delivery-interval-in-millis="7000" redelivery-interval-internal-in-millis="5000"/>"

I haven't tried to update that value, but I have scheduled an event every 10s without problems.
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can specify millisecond timing in the Timer API in your Java code, but not declaritively in the activation config.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!