Hello,
I have a Servlet that uses a Stateful Session Bean that does very lengthy db operations. While the db operation is in progress, if a user clicks on the stop button any subsequent use of the site results in
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
com.ibm.ejs.container.BeanNotReentrantException
The way we've written our code is we get a handle to the EJB object once for each user that logs in and use the same handle for their entire stay. My thinking is that since stateful session beans are attached to only one thread and are not reentrant, the Servlet thread that was interrupted (user clicked the stop button) never cleaned itself up and still has a hook into the EJB object.
So, my question is how can I catch the stop button event and clean things up?
Any ideas?
Thanks.
-
Interrupting a Stateful Session Bean (1 messages)
- Posted by: Arash F
- Posted on: April 19 2002 10:09 EDT
Threaded Messages (1)
- Interrupting a Stateful Session Bean by Swapnil Shah on April 22 2002 05:24 EDT
-
Interrupting a Stateful Session Bean[ Go to top ]
- Posted by: Swapnil Shah
- Posted on: April 22 2002 05:24 EDT
- in response to Arash F
U can use ActionHandler and inside that u can deset the handle u had acquired, or u can remove the handle by setting it to null. Ofcourse care should be taken that a new user should be able to locate the EJB handle.