protected AbstractNameQuery configureRoleMapper(DeploymentContext deploymentContext, GerSecurityType securityType, ClassLoader classLoader) throws DeploymentException {
Map<String, SubjectInfo> roleDesignates = new HashMap<String, SubjectInfo>();
Map<Principal, Set<String>> principalRoleMap = new HashMap<Principal, Set<String>>();
if (securityType.isSetRoleMappings()) {
GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
GerRoleType roleType = roleMappingsType.getRoleArray(i);
String roleName = roleType.getRoleName().trim();
if (roleType.isSetRunAsSubject()) {
SubjectInfo subjectInfo = buildSubjectInfo(roleType.getRunAsSubject());