Hi, How do I run 2 RMI Servers on the same machine? They are bound to different locations i.e. /Service1 and /Service 2. The class files for each are ti be run from different locations however - I thought I could start two instances of rmiregistry, on in each location, but it wont let me! Any ideas?
I thought I could start two instances of rmiregistry, on in each location, but it wont let me!
I am not sure what you are trying but in general, you can actually start two instance of RMIRegistry on different unused ports. But you can run only one rmiregistry per JVM (bcos rmiregistry uses a hard coded ObjID, whic is assigned to each remote object) and you will get a ExportException, this normally happens when you programatically start the registry using LocateRegistry.createRegistry(port).