if(!isValid)
{
Exception cause = (Exception) sc.getData().get("org.jboss.security.exception");
throw new RuntimeException("no valid principal", cause);
}
authenticationHelper.pushSubjectContext(subject);
//RealmMapping rm = (RealmMapping) sc.getAuthenticationManager();
RealmMapping rm = lookup("java:AuthenticationManager", RealmMapping.class);
SecurityDomain domain = null;
return helper.getCallerPrincipal(sc, rm, domain);
}