[jboss-user] [Remoting] - Re: Remoting 2.5 SP1 - ServerInvoker.TIMEOUT does not work?

ron.sigal@jboss.com do-not-reply at jboss.com
Fri Nov 14 03:20:33 EST 2008


In fact, you've discovered the fact that a timeout value is never set for the ServerSocket in SocketServerInvoker.  In fact, there really doesn't seem to be any point to setting the timeout value, since all we would do in the event of a timeout is go back and call ServerSocket.accept() again.  In fact, the asynchronous nature of a distributed system suggests that the server should be prepared to wait indefinitely to hear from a client.

If you look in SocketServerInvoker.run(), you will see two calls to getTimeout(), the result of which is passed to a ServerThread in each case.  This timeout value is used to set the timeout value for the Socket through which invocations will arrive from the client.  Given that network connections are a relatively scarce resource, it *does* make sense to let these sockets time out if an invocation is not forthcoming, rather than have them wait forever.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189305#4189305

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189305



More information about the jboss-user mailing list