I am creating a distributed system using Java RMI and it must support server loss.
If my client is connected to a server using RMI, if this server goes down (for example the cable problem), then my client should get an exception so that he is connected to another server.
But when the server goes down, my client does not have anything, he keeps waiting for the answer. How can I decide for a time limit for this?
To finish reading the socket, you can set your own factory, / S> Socket socket = new socket (); socket.setSoTimeout (timeoutMillis); Socket .SetSlinger (wrong, 0); socket.connect (new inset socket attendor (host, port), timeout milis); return socket;} public server Set Bnaaasrhwarsoket (Inter port) throws IOException {New Srhwarsket (port);}});
No comments:
Post a Comment