Name: rmT116609 Date: 09/09/2004
A DESCRIPTION OF THE REQUEST :
I have a Server called 'middle' which runs IPv4 and IPv6. I have a client called 'old' which is running only IPv4, and a client called 'new' running only IPv6. When I export a remote object on 'middle', the object gets to have one and only one TCPEndpoint in the RemoteRef. This means that the object will only work on one of the networks. It'd be really nice if the exported object would list all of addresses for 'middle' such that the clients could iterate through the TCPEndpoints until it found one that worked.
Currently, if the remote object exports the IPv4 address "10.10.10.1" and the IPv6 client gets a reference to that object, as soon as the IPv6 client tries to execute a method on that remote object I get a "Network Unreachable" IOException thrown at me. It seems ironic that the IPv6 client can get a reference to the remote object, but then it can't actually use it.
JUSTIFICATION :
This is needed in situations where a server exports a remote object to clients that reside on multiple (and isolated) subnetworks. Two classic examples are: 1) Hybrid networks (IPv4 and IPv6), and 2) multiple isolated segments - where 'middle' has IP addresses 10.10.10.1 and 10.10.20.1 and needs to serve up the remote objects to both/all subnets.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When a remote object is exported, the RemoteRef would contain a list of all possible TCPEndpoints that could be used to access the server.
ACTUAL -
When a server exports a remote object, there's room for just one TCPEndpoint.
---------- BEGIN SOURCE ----------
Pick any RMI demo application. The hard part is setting up environment, which needs a server that resides on multiple (and isolated) subnetworks. The "best" example is a server that runs IPv4 and IPv6, and then using an IPv4-only client, and an IPv6-only client.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Have to manually bind an extra copy of each object within the registry with an explicit host-address. This is very cumbersome because my server has two NICs, each running IPv4 and IPv6 - 4 different addresses and thus 4 copies of the same object. This also means that my clients have to iterate through the registry, retrieve each remote object, and execute a dummy method on the remote object to bake sure it'll actually work.
I could also use the java.rmi.hostname property thing to make the exported address be the machine's name, but DNS lookup isn't guaranteed to be available.
(Incident Review ID: 302292)
======================================================================