EJB programming & troubleshooting: TimeOut for EJB method calls
- Posted by: Sriganesh Sundaram
- Posted on: July 25 2002 14:57 EDT
Is there a way I can force an EJB method to stop processing/timeout and return control (maybe an exception)?.
Our specific requirement is that we have an EJB application that may take a long time to process and we do not want the client EJB to wait that long. Hence, I was looking for a mechanism to return control if the method processing does not finish by the timeout period.
- TimeOut for EJB method calls by michele mondora on July 25 2002 16:56 EDT
- TimeOut for EJB method calls by Spatemp Spatemp on August 20 2004 14:57 EDT
- TimeOut for EJB method calls by Manmohan Ghuman on October 08 2004 04:04 EDT
I suggest usage of the transaction timeout.
Yes, We tried the transaction timeout but it did not do the job.
The transaction timeout only times out the transaction and rolls back the transaction in the context but does not interrupt the method execution. So, we get a transaction timeout exception after the complete processing is over.
In case of CMT you are right, try with BMT.
I am going through the same issue. I was wandering if your question was answered.
we are also having a similar issue in our setup. we have an EJB in our application which is calling the methods of a remote EJB running on some other machines. Now at times the remote EJB donot responds in time and leaves the connection as such with the client (my EJB). When there is high load, such scenario lead our server into a hung siuation where we are left with piling open connections and every thing goes for toss.
If anyone can provide any popinters on how can we timeout may be at client end or server end to stop the processing and return the control may be in the form of exceptions.
We also want to set up timeout for Remote EJB calls. Please let me know if anybody able to resolve it.