groupContext = (DirContext) mainDirContext.lookup(GROUP_SEARCH_BASE);
String groupNameAttributeValue = (String) resultedGroup.getAttributes().get(
realmConfig.getUserStoreProperty(
LDAPConstants.ROLE_NAME_ATTRIBUTE_NAME)).get();
if (groupNameAttributeValue.equals(roleName)) {
groupContext.destroySubcontext(groupName);
}
this.userRealm.getAuthorizationManager().clearRoleAuthorization(roleName);
} catch (NamingException e) {
String errorMessage = ("Error occurred while deleting the role: " + roleName);