Fix for issue 2962 (Setup should allow non-secure replication port while LDAP access is SSL-enabled)
I was not able to reproduce the issue as it is described but discussing with the QA team we decided that it would be worth to do the following improvements:
1. If we cannot contact on one of the ports of a server that is registered in the ADS we must try to connect to the other ports.
2. We should try to connect to the port specified by the user in the setup (when specifying the server that we want to configure replication with). This also applies to the dsreplication utility.
Beside the two improvements above, I updated the code so that the progress messages use the port specified by the user to identify the OpenDS instances.
Without these changes (if security is configured) the user can be confused since we refer to secure ports (even if (s)he specified the regular LDAP port) and we ask the user to accept certificates.
Concerning the implementation, basically I added a class called PreferredConnection that is used to describe the LDAP URL and connection specified by the user. The objects are passed to the TopologyCache and the TopologyCache passes them to ServerLoader which is the class that creates the connection to the servers to read their configuration.