I see the timeout is still happening in the latest release (1.2.7.3).
How can I set the timeout to < 0 for the remote cache? I still think a better fix is to pass -D* sun.rmi.transport.tcp.readTimeout=10000 in the shell script.* *sun.rmi.transport.tcp.readTimeout* (1.2.2 and later) The value of this property represents the time (in milliseconds) used as an idle timeout for incoming RMI-TCP connections. The value is passed to java.net.Socket.setSoTimeout. This property is used only for cases where a client has not dropped an unused connection as it should (see * sun.rmi.transport.connectionTimeout*<http://java.sun.com/j2se/1.3/docs/guide/rmi/sunrmiproperties.html#connectionTimeout>). The default value is 2*3600*1000 milliseconds (2 hours). On 4/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Author: asmuts Date: Mon Apr 10 09:58:01 2006 New Revision: 392988 URL: http://svn.apache.org/viewcvs?rev=392988&view=rev Log: do not setup a custom rmi factory if the timeout specified is <= 0 Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java URL: http://svn.apache.org/viewcvs/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java?rev=392988&r1=392987&r2=392988&view=diff ============================================================================== --- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java (original) +++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java Mon Apr 10 09:58:01 2006 @@ -128,25 +128,29 @@ try { - // TODO make configurable. - // use this socket factory to add a timeout. - RMISocketFactory.setSocketFactory( new RMISocketFactory() + // Don't set a socket factory if the setting is -1 + if ( irca.getRmiSocketFactoryTimeoutMillis() > 0 ) { - public Socket createSocket( String host, int port ) - throws IOException + // TODO make configurable. + // use this socket factory to add a timeout. + RMISocketFactory.setSocketFactory( new RMISocketFactory() { - Socket socket = new Socket( host, port ); - socket.setSoTimeout( irca.getRmiSocketFactoryTimeoutMillis() ); - socket.setSoLinger( false, 0 ); - return socket; - } + public Socket createSocket( String host, int port ) + throws IOException + { + Socket socket = new Socket( host, port ); + socket.setSoTimeout( irca.getRmiSocketFactoryTimeoutMillis() ); + socket.setSoLinger( false, 0 ); + return socket; + } - public ServerSocket createServerSocket( int port ) - throws IOException - { - return new ServerSocket( port ); - } - } ); + public ServerSocket createServerSocket( int port ) + throws IOException + { + return new ServerSocket( port ); + } + } ); + } } catch ( Exception e ) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
