Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Holger Haag
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops cannot close this topic, i'm not a sheriff.
live long and prosper
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!