log.logInfo("userExists: Truststore is " + System.getProperty("javax.net.ssl.trustStore"));
    public final boolean userExists(final String username) throws BackendException {        // Sanity checks.        if ((username == null) || (username.length() == 0))            return false;        // The search pattern.        String pattern = usernameAttribute + '=' + username;        // Go through all references.        for (int i = 0; i < myReferences.length; i++) {            String[] references = myReferences[i].getReferences();            for (int j = 0; j < references.length; j++) {                // Search this reference.                InitialLdapContext ldap = null;                try {                    ldap = connect(references[j]);                    if (ldapSearch(ldap, pattern) != null)                        return true;                } finally {                    // Close the LDAP connection.                    if (ldap != null) {                        try {                            ldap.close();                        } catch (NamingException e) {                            // Ignored.                            log.logWarn("Unable to close the backend connection to " + references[j], mySessionTicket, e);                        }                    }                }            }        }        // Still no match.        return false;    }