aspose file tools
The moose likes EJB and Other Java EE Technologies and the fly likes How to specify a timeout for EJB client or how to stop a remote call Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and Other Java EE Technologies
Reply Bookmark "How to specify a timeout for EJB client or how to stop a remote call " Watch "How to specify a timeout for EJB client or how to stop a remote call " New topic
Author

How to specify a timeout for EJB client or how to stop a remote call

Holger Haag
Greenhorn

Joined: Nov 12, 2001
Posts: 5
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
Holger Haag
Greenhorn

Joined: Nov 12, 2001
Posts: 5
Hi all,
i got some responses on this topic in the java developer conneciton, so i'm closing it here
http://forum.java.sun.com/thread.jsp?forum=13&thread=189553&start=0&range=15#620467
Holger Haag
Greenhorn

Joined: Nov 12, 2001
Posts: 5
oops cannot close this topic, i'm not a sheriff.
live long and prosper
 
 
subject: How to specify a timeout for EJB client or how to stop a remote call
 
Threads others viewed
how to stop rmiregistry ??
Transaction Timeouts
thread killing from seperate thread
best way to kill ?
how to set timeout in a web service client with JAX-WS 2.0?
IntelliJ Java IDE