This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a javaservlet which accesses a stateless EJB on JBoss on a remote server, using code
Object objref = initial.lookup("TestBean");
CalculatorRemoteHome home = (TestRemoteHome) PortableRemoteObject.narrow(objref,TestRemoteHome.class);
TestRemote echo = home.create();
I want to set a timeout on the method "do_long_request"
1) Request data from ejb
2) if ejb requires more the say 30 seconds to process request and send back result data to client then
timeout on the client side and show a kind of "request took too long" error page.
Is is possible to set such a timeout , either by a config file setting or programatically?
Thanks in advance