Yep. Call java.rmi.RemoteServer.getClientHost(). If it doesn't throw an exception, you are in an RMI thread and you can check the returned hostname to see whether it is local. If it does throw an exception, you are being called locally from within the same JVM via direct (local) method invocation.