docs: private Set<String> getGroupsByMembership(DirContext context, String callerDn) {
          String memberOfAttribute = idStoreDefinition.getGroupMemberOfAttribute();
          String groupNameAttribute = idStoreDefinition.getGroupNameAttribute();
          Attributes attrs;
          Set<String> groupDns = new HashSet<String>();
  
          if (tc.isDebugEnabled()) {
              Tr.debug(tc, "JNDI_CALL getAttributes", new Object[] { callerDn, memberOfAttribute });
          }
          try {
              attrs = context.getAttributes(callerDn, new String[] { memberOfAttribute });
  
              Attribute groupSet = attrs.get(memberOfAttribute);
              if (groupSet != null) {
                  NamingEnumeration<?> ne = groupSet.getAll();
                  while (ne.hasMoreElements()) {
                      groupDns.add((String) ne.nextElement());
                  }
              }
          } catch (NamingException e) {
              Tr.warning(tc, "JAVAEESEC_WARNING_EXCEPTION_ON_GETATTRIBUTES", new Object[] { callerDn, memberOfAttribute, e });
          }
  
          if (groupNameAttribute.equalsIgnoreCase("dn")) {
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "getGroupsByMembership", groupDns);
              }
              return groupDns;
          }
  
          Set<String> groupNames = new HashSet<String>();
          String groupDn = null;
          Iterator<String> it = groupDns.iterator();
          try {
              while (it.hasNext()) {
                  groupDn = it.next();
                  if (tc.isDebugEnabled()) {
                      Tr.debug(tc, "JNDI_CALL getAttributes", new Object[] { groupDn, groupNameAttribute });
                  }
                  Attributes groupNameAttrs = context.getAttributes(groupDn, new String[] { groupNameAttribute });
                  Attribute groupNameAttr = groupNameAttrs.get(groupNameAttribute);
                  if (groupNameAttr == null) {
                      Tr.warning(tc, "JAVAEESEC_WARNING_MISSING_GROUP_ATTR", new Object[] { groupDn, groupNameAttribute });
                      continue;
                  }
                  NamingEnumeration<?> ne = groupNameAttr.getAll();
                  if (ne.hasMoreElements()) {
                      groupNames.add((String) ne.nextElement());
                  }
              }
          } catch (NamingException e) {
              Tr.warning(tc, "JAVAEESEC_WARNING_EXCEPTION_ON_GETATTRIBUTES", new Object[] { groupDn, groupNameAttribute, e });
          }
          if (tc.isDebugEnabled()) {
              Tr.debug(tc, "getGroupsByMembership", groupNames);
          }
          return groupNames;
      }