Results 1 to 1 of 1
Thread: EJB Timer Service
- 12-08-2009, 03:27 AM #1Member
- Join Date
- Dec 2009
- Rep Power
EJB Timer Service
Let say there are multiple servlet request from the user and each of the request will result int calling the same EJB method available at the back-end project (back-end and front-end project are 2 separated projects), will the back-end spawn additional threads to handle the request? The reason of being asking this question is that I got a strange occurrence while building a ejb timer service back-end. Initially, when my front-end is deployed onto a AS, it will automatically start a servlet and resulting in creating a timer with ejb timer service at the back-end. Everything looks good. I have other ejb functions that will check the next timeout time and info of the timer and such information will be displayed onto a jsp using ajax.
I got everything working and I can see that there is only 1 timer event running at the back-end from the console. But if I keep refreshing the page and retrieve the next timeout time and info of the timer from jsp, I can see that the back-end suddenly have another timer started and I can see that the timer is running at the initial configuration of my back-end (i have a counter to keep track of how many times does the timer has timeout, in this case, the counter shows 1 for the new timer and x for the old existing timer). I am pretty sure that I did not have any create timer business logic during anywhere on my front-end and back-end except at the start up servlet. If I cancel the timer, both timer will be canceled.
So. It is the multiple ajax request from the jsp resulting in creating another instance or thread of the timer object?
- By kirtichopra2003 in forum Web FrameworksReplies: 1Last Post: 10-24-2009, 02:19 AM
- By Kinyo in forum New To JavaReplies: 15Last Post: 03-15-2009, 02:37 AM
- By mrjunsy in forum Advanced JavaReplies: 0Last Post: 08-22-2008, 04:09 PM
- By mrjunsy in forum New To JavaReplies: 0Last Post: 08-04-2008, 06:47 PM
- By Java Tip in forum java.utilReplies: 0Last Post: 04-04-2008, 02:46 PM