jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alistair Forbes" <forbes...@googlemail.com>
Subject Re: RMISocketFactory
Date Thu, 06 Apr 2006 19:22:58 GMT
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 <Aaron.Smuts@travelocity.com> 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:forbes.al@googlemail.com]
> > Sent: Thursday, April 06, 2006 3:10 PM
> > To: jcs-users@jakarta.apache.org
> > 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: jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-users-help@jakarta.apache.org
>
>

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