Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How set timeout in a EJB remote lookup?

843830Jun 7 2007 — edited Jun 8 2007
Hello,
how can I set the timeout of a remote lookup?

InitialContext ctx = new InitialContext();
EJB2Remote ejb2RemoteWithLookup = (EJB2Remote)ctx.lookup("java:comp/env/ejb/EJB2");

If EJB2 is a bean that reside on a remote server and that server isn't reachable, the lookup fails after about 30-40 seconds. It's possible to set the timeout to 5 seconds?

I use SJSAS 9.

Thank you,
Luca
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 6 2007
Added on Jun 7 2007
1 comment
258 views