public Rdn[] findGroupRDN(String groupname) throws Exception {
        try {
            return findGroupRDN(groupname, baseDN);
        }
        catch (Exception e) {
            if (alternateBaseDN == null) {
                throw e;
            }
            return findGroupRDN(groupname, alternateBaseDN);
        }
    }
Finds a groups's RDN using it's group name. Normally, this search will
be performed using the field "cn", but this can be changed by setting
the {@code groupNameField} property.<p>

Searches are performed over all subtrees relative to the {@code baseDN}.
If the search fails in the {@code baseDN} then another search will be
performed in the {@code alternateBaseDN}. For example, if the {@code baseDN}
is "o=jivesoftware, o=com" and we do a search for "managers", then we might
find a groupDN of "uid=managers,ou=Groups". This kind of searching is a good
thing since it doesn't make the assumption that all user records are stored
in a flat structure. However, it does add the requirement that "cn" field
(or the other field specified) must be unique over the entire subtree from
the {@code baseDN}. For example, it's entirely possible to create two dn's
in your LDAP directory with the same cn: "cn=managers,ou=Financial" and
"cn=managers,ou=Engineers". In such a case, it's not possible to
uniquely identify a group, so this method will throw an error.<p>

The RDN that's returned is relative to the default {@code baseDN}.

@param groupname the groupname to lookup the RDN for.
@return the RDN associated with {@code groupname}.
@throws Exception if the search for the RDN fails.
xmppserver/src/main/java/org/jivesoftware/openfire/ldap/LdapManager.java