I have some method which is going to call remote method through RMI as the following:
/**
* Implementation is supposed to be thread safe
*/
public interface Act extends java.rmi.Remote{
String doSome() throws RemoteException;
}
public class SomeClass {
private static final Act stub = (Act) Naming.lookup("/server/stub")
public static void someMethodAccessedByMultipleThreads(){
System.out.println(stub.doSome());
}
}
If the remote method is thread safe is it safe to call someMethodAccessedByMultipleThreads
by multiple threads?
Or are there some RMI-threading/networking/something_else issues?