Search code examples
javarmi

Can multiple objects be linked to one name in RMI?


Can multiple objects be linked (bound) to one name in RMI ? If that is possible whose reference will Naming.lookup("name") return ?


Solution

  • No, it's a 1:1 relationship between names and objects. Anything else makes no sense.

    You might have different implementations of the same interface, but each one has to have a unique name for looking up the proxy.