This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes RMI timeout configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "RMI timeout configuration" Watch "RMI timeout configuration" New topic

RMI timeout configuration

Pat Sun

Joined: Apr 24, 2005
Posts: 8
Hi All, I am developing a RMI program. Everything works fine when the connection is available. However, when the server is down, it takes the RMI client 3 minutes to throw the connection time exception, which causes major problem for our project. The stack trace of the exception is as follows:

The cause of the problem was, I put a server name that can not be resolved in the Naming.lookup method. If I put an IP address and shutdown the RMI server, the RMI client will return immediately with a connection time exception. Is there a way to change the time out value the client will wait to a smaller value to, say, 10 seconds? Thanks
[ October 24, 2005: Message edited by: Sarah Pugnali ]
Seb Mathe
Ranch Hand

Joined: Sep 28, 2005
Posts: 225
There are some system properties, I think you'll find a solution here...

Regards,<br />Seb<br /> <br />SCJP 1.4
I agree. Here's the link:
subject: RMI timeout configuration
Similar Threads
Unable to start Glassfish v2.1 without internet connection
rmi--about socket factory
Nio server Socket Listener?
" Connection refused" got in Linux (RedHat 9)
Urgent help on ConnectException required..