I found this question where one of the answer introduce the JVM pameter sun.rmi.transport.tcp.responseTimeout
. I know that's an obvious/stupid question, but can someone explain me how to set it in details (usually I don't set these JVM parameters).
Anyway, the most important problem would not get resolved: I'm introducing this timeout in a Distributed System since I need it for communication between Servers. In othere words, if a Server1 calls a remote method of Server2 and the timeout elapses, then the Server2 is considered lost by the Server1. This timeout is shorter than the one used from a Client to consider a Server down.
So I need two different timeouts: one for RMI between Servers and one from Client to Server.
You set it at whichever JVM is going to be the RMI client in the situation, either via the command line or System.setProperty(),
just like any other system property.