How to specify a timeout for EJB client or how to stop a remote call
Holger Haag
Greenhorn
Joined: Nov 12, 2001
Posts: 5
posted
0
Hi all, I have an EJB which returns responses within a few seconds. However, sometimes this can take much longer, e.g. because of network problems. Currently the client waits "forever" (at least a few minutes), so all I can do is kill the application and restart it. Is there a way to specify a timeout for an EJB call ? Or, is there a stop an EJB request is a "clean" way ? In that case I could simply create a separate Thread which does the request and - on another thread - see if I have a response after 20 sec. If not, I kill the request. This would also enable my Swing GUI to repaint itself as the request is no longer running on the Swing tread. Thanks Holger