All works perfectly if I use port 1099. But when I specify another port like: // Start up a RMI registry. LocateRegistry.createRegistry(1098);
I get a java.rmi.ConnectException. Why? Are there only some ports that are valid for RMI? I have tried a whole lot and havn't found another one that works.
Originally posted by Jacques Bosch: All works perfectly if I use port 1099. But when I specify another port like: // Start up a RMI registry. LocateRegistry.createRegistry(1098);
I get a java.rmi.ConnectException. Why?
Check out the Java API for LocateRegistry.createRegistry and you'll see that it returns a Registry object. The Registry object returned is the registry that you need to reference from then on. For example:
Hi Jacques: Can you statement your problem detailly ? Because in my test, this two way all work fine. one: Registry registry = LocateRegistry.createRegistry(1234); registry.rebind(xxxxx, xxxxx); two: LocateRegistry.createRegistry(1234); Naming.rebind(xxxxx, xxxxx);
Well, that only worked for me on port 1099. When using a different port, I got the exception I posted previously. The first one works fine for me though.
Hi Jacques: My test evn is JBuilder 9 + windows 2000, I use this way run the server successfully, in the client I get a Exception, but isn't the connect problem, did you find the answer of your problem??? Thanks. [ February 04, 2004: Message edited by: Leo Tien ]
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
Gift giving made easy with the permaculture playing cards