I have a client program that calls remote methods on a server. Now, I want to create 3 different servers based upon the IP address sent by the client.
Question: Should I create 3 different Remote objects and bind them to the same registry. or should I create 3 different Remote objects and bind them to their respective registry ??
What I am doing right now is one Remote object and binding all 3 objects to the same registry.
Remote obj=UnicastRemoteObject.exportObject(this,2026);
Registry r=LocateRegistry.createRegistry(2026);
r.bind("NA", obj);
r.bind("EU", obj);
r.bind("AS", obj);