Discussions
EJB programming & troubleshooting: To call a cleanup method after 10 sec in a stateless session bea
-
To call a cleanup method after 10 sec in a stateless session bea (2 messages)
- Posted by: Mansi Sachar
- Posted on: October 08 2008 07:27 EDT
Hi all, I have a stateless session bean.In its interceptor i call a cleanup method.That means cleanup is performed only when any action is performed.Now i want that the cleanup method to be called after every 10 sec even if no action is performed.Can anybody plz help me? Regards, MansiThreaded Messages (2)
- Re: To call a cleanup method after 10 sec in a stateless session bea by Nicke G on October 08 2008 15:44 EDT
- Re: To call a cleanup method after 10 sec in a stateless session by anish mathur on October 08 2008 21:36 EDT
-
Re: To call a cleanup method after 10 sec in a stateless session bea[ Go to top ]
- Posted by: Nicke G
- Posted on: October 08 2008 15:44 EDT
- in response to Mansi Sachar
Use a timer service that invokes the cleanup method with a frequency of 10 secs: http://www.javabeat.net/articles/3-ejb-30-timer-services-an-overview-1.html (That is of course under the assumption that cleaning after each "normal" invocation is not enough) /N -
Re: To call a cleanup method after 10 sec in a stateless session[ Go to top ]
- Posted by: anish mathur
- Posted on: October 08 2008 21:36 EDT
- in response to Nicke G
The EJB Timer can be used, but you cannot relay on EJB Timer for short time interval like 10 sec. It is only good for long time interval and also in the scenario where slight variation in interval time is acceptable.