Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Timeout

 
Guruprasad Kateel
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am calling a method on a Stateless Session Bean which is not in a transaction. Is there a way to timeout this method call if the client doesnot receive the response in the specified time interval?
I am using Weblogic 6.1 sp4.
Thanks in advance.
Prasad
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don understand why do you need this feature. If the server is not available it is going to throw execption anyway.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe the operation has shorter timeout than the RMI call normally would have? If you can't figure out any other solution, you could just launch a thread for calling the session bean and block in the original thread until the call-thread signals a response or the original thread decides enough time has passed and returns/throws an error to its own caller. It's dirty but it usually works.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This was a duplicate. Sorry. (Can't delete this post right now...)
[ August 07, 2003: Message edited by: Lasse Koskela ]
 
Vinod John
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Guruprasad Kateel:
I am calling a method on a Stateless Session Bean which is not in a transaction. Is there a way to timeout this method call if the client doesnot receive the response in the specified time interval?
I am using Weblogic 6.1 sp4.
Thanks in advance.
Prasad

You may have to take a look at Timer service in EJB 2.1 (but WLS 6.1 is based on 2.0 ???). This article could be a good starting point
http://www.theserverside.com/resources/articles/MonsonHaefel-Column4/article.html
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vinod,
The timer service is entriely different from timeout requirement of Gurruprasad.
 
Vinod John
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:
Vinod,
The timer service is entriely different from timeout requirement of Gurruprasad.

Yes, I am wrong .. I was mislead by the "Timer" ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic