The problem was resolved by restarting XCS and is explained as follows: with RMI, the client asks uses java.naming.provider.url for a remote reference, the server responds with a server hostname and port to use to get that object. XCS was sending back its server hostname of 192.168.0.3, it hadn't updated itself since my ip changed.
From http://java.sun.com/j2se/1.4.2/docs/guide/rmi/faq.html#nethostname
For an RMI client to contact a remote RMI server, the client must first hold a reference to the server. The Naming.lookup
method call is the most common mechanism by which clients initially obtain references to remote servers. Remote references may be obtained by other means, for example: all remote method calls can return remote references. This is what Naming.lookup
does; it uses a well-known stub to make a remote method call to the rmiregistry
, which sends back the remote reference to the object requested by the lookup
method.
Every remote reference contains a server hostname and port number that allow clients to locate the VM that is serving a particular remote object. Once an RMI client has a remote reference, the client will use the hostname and port provided in the reference to open a socket connection to the remote server.
No comments:
Post a Comment