Hello, I am done with coding and testing my B&S application, just found problem with port numbers.
-I started the server by specifying host=localhost and port = 8080 (for testing)
-Starting Client on host=localhost and port=8080 --> Client successfully connects
-Starting Client on host=localhost and port=1099 (Which is default port)also works --> Client successfully connects
-Starting Clinet on host=localhost and port=any other port number other than above two do not work--> connection fails.
why doest RMI Registry allow client to connect to server when it is trying use port 1099 whereas server is listening at 8080
and why only 1099 is accepted not any other port number?
Please help, I am very near to submission and exhausted by tweaking here and there.
kevin, thanks for the input, I was doing similar thing but had a syntax problem with url, It semms to work now.
I saw your code:
You are using LocateRegistry.createRegistry(rmiPort), This creates a registry on localhost only. If you need to use a registry running on a host other than where your server is running.
My server takes following parameters:
If I specify host other than localhost, I use LocateRegistry.getRegistry(String host, int port), But if it does not find the specified host it will return reference to registry on localhost and port 1099 (Defaults)
Do I need to wory about using rmi registry on host other than localhost, if yes, how do I know if remote host is null.
Ruth Stout was famous for gardening naked. Just like this tiny ad: