Ron, thank you for the explanation!

"[EMAIL PROTECTED]" wrote : 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. 
  | 
When i had looked at the code, i did infact see that the AcceptorThread was 
just accepting the connection and then the ServerThread was doing the actual 
work (as explained in the docs too). 

"[EMAIL PROTECTED]" wrote : 
  |  In fact, the asynchronous nature of a distributed system suggests that the 
server should be prepared to wait indefinitely to hear from a client.
  | 
I had been trying out this application with the following usecase:
- Connector (server) waits for commands (custom commands like startServer, 
stopServer, getServerStatus) on some url after calling the create and start 
remoting API
- Client can connect to the server using Remoting APIs and then send out 
requests which the ServerInvocationHandler will handle.
- All this was being done as part of a testcase. So if for some reason, the 
client never managed to connect to the server, i did not want the testcase to 
wait forever waiting for a client. That's where i was looking for a timeout 
functionality on the Conncetor.start() API. I think i will have to revisit my 
usecase.



"[EMAIL PROTECTED]" wrote : 
  | 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.

Makes sense. Thanks for the explanation :-)


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189569
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to