posted 20 years ago
Hello.
I have a question, maybe someone has had a similar problem. I have a client-server application with communication over RMI. The client may, through a dialog box, choose a connection "submethod":
* a simple RMI
* RMI over fixed ports
* RMI over HTTP.
After selection the application registers the proper socket factory with the RMISocketFactory.setSocketFactory(...) method. So, if the user disconnects from the server and tries to reconnect with another "submethod", the application throws the following exception:
API says "The RMI socket factory can only be set once", so how can I change the connection submethod at runtime?
Regards,
Marek.