Problems with RMI and JWS
Hi!
I am currently working on a client/server RMI project. The server module is starting RMIRegistry at the server host and waits for clients to connect.
The client connects the server by RMI and registers a RMIService for the server to call in the client.
The client may call methods in the server.
The server may call other methods in the client.
This worked great until we introduced Java Web Start.
There is no way of setting the java.rmi.server.hostname system property due to security reason from inside the jws sandbox.
The reason for doing this is to force the JVM to specify the correct IP-address in the service provided for the server. The server fails connecting the client when calling clientmethods because the client host has several IP-addresses. (ie. VPN + ISP address)
We used to set this by doing a System.setProperty call but this is now prohibited. Is there a way to force a UnicastRemoteObject to use another IP than getLocalHost().. getLocalHost returns the wrong IP!!

