jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alistair Forbes" <forbes...@googlemail.com>
Subject RMISocketFactory
Date Thu, 06 Apr 2006 19:10:26 GMT

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.setSoLinger(false, 0);
                                        return socket;
                                public ServerSocket createServerSocket(int
port) throws IOException {
                                        return new ServerSocket(port);

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message