protected ConnectionFactory prepareConnectionFactory(final String ldapURL) {
        val config = ConnectionConfig.copy(this.connectionConfig);
        if (!config.getLdapUrl().equalsIgnoreCase(ldapURL)) {
            config.setConnectionInitializers();
        }
        config.setLdapUrl(ldapURL);
        return new DefaultConnectionFactory(config);
    }
Prepare a new LDAP connection.

@param ldapURL the ldap uRL
@return connection factory
support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/ldap/LdaptiveResourceCRLFetcher.java