A 10 second timeout is preferable to no timeout.  The timeout value is
configurable, but only for the entire vm.  What is your suggestion or
complaint exactly?

> -----Original Message-----
> From: Alistair Forbes [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 06, 2006 3:10 PM
> To: [email protected]
> Subject: RMISocketFactory
> 
> Hi,
> 
> Some time back a socket timeout was added to the RemoteCache.java.
> 
> I guess this is incorrect, as it changes the static RMISocketFactory.
> This means that any other RMI server started will also inherit this.
> The side effect of this is that all clients connecting to the RMI
> server have a 10 sec timeout.
> 
> I have not looked into this, but you probably need to extent
> RMISocketFactory, and not change the default RMI server. Actually if
> this is needed I think setting *sun.rmi.transport.tcp.readTimeout
> *would achieve the same thing.
> 
> 
> RMISocketFactory.setSocketFactory(new RMISocketFactory() {
>                                 public Socket createSocket(String
host,
> int
> port) throws IOException {
>                                         Socket socket = new
Socket(host,
> port);
> 
> socket.setSoTimeout(timeoutMillis);
>                                         socket.setSoLinger(false, 0);
>                                         return socket;
>                                 }
>                                 public ServerSocket
createServerSocket(int
> port) throws IOException {
>                                         return new ServerSocket(port);
>                                 }
>                         });

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to