I think the correct fix is to implement something like: public class CacheRMISocketFactory extends RMISocketFactory
And only set timeouts for this Factory. But I think the current code could achieved the same result by setting - Dsun.rmi.transport.tcp.readTimeout=10000 I think the timeout is only needed for org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory so the existing code could be removed. Or was the original problem the client side callbacks? On 4/6/06, Smuts, Aaron <[EMAIL PROTECTED]> wrote: > > Ok. So it is affecting any rmi process running in that vm. Hmmn. Any > suggestions? I'll look into another option. > > > > > -----Original Message----- > > From: Alistair Forbes [mailto:[EMAIL PROTECTED] > > Sent: Thursday, April 06, 2006 3:23 PM > > To: JCS Users List > > Subject: Re: RMISocketFactory > > > > If an RMI application (server) uses a remote cache the RMI timeout is > set > > to > > 10 secs. Any client connecting to the RMI server has a 10 second > timeout. > > If > > the task on the server is expected to take longer than 10 secs, but > the > > RMI > > server times the client out. > > > > > > On 4/6/06, Smuts, Aaron <[EMAIL PROTECTED]> wrote: > > > > > > 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] > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
