|
What is Timer Services in EJB Framework |
|
|
The TimerService interface in javax.ejb package provides facility to access the container-provided Timer Service. The EJB Timer Service works with entity beans, stateless session beans, and message-driven beans to for timer callback events at a particular / after a specified elapsed time/after a specified interval.
This example Code creates a timer:
TimerService timerService = context.getTimerService();
Timer timer = timerService.createTimer(2200,"timer creation ");
|
When a timer expires then container calls the ejbTimeout method of the corresponding bean implementation class. The ejbTimeout method contains the business logic that handles the timed event.
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.