String dn = getIdentityDn(ldapAccount, identityName);
String dn = getIdentityDn(ldapEntry, identityName);
    public void deleteIdentity(Account account, String identityName) throws ServiceException {        LdapAccount ldapAccount = (LdapAccount) (account instanceof LdapAccount ? account : getAccountById(account.getId()));        if (ldapAccount == null)             throw AccountServiceException.NO_SUCH_ACCOUNT(account.getName());        if (identityName.equalsIgnoreCase(DEFAULT_IDENTITY_NAME))            throw ServiceException.INVALID_REQUEST("can't delete default identity", null);                DirContext ctxt = null;        try {            ctxt = LdapUtil.getDirContext(true);            Identity identity = getIdentityByName(ldapAccount, identityName, ctxt);            if (identity == null)                throw AccountServiceException.NO_SUCH_IDENTITY(identityName);            String dn = getIdentityDn(ldapAccount, identityName);                        ctxt.unbind(dn);        } catch (NamingException e) {            throw ServiceException.FAILURE("unable to delete identity: "+identityName, e);        } finally {            LdapUtil.closeContext(ctxt);        }    }