/** * Push the run as role using the SecurityAssociation.pushRunAsIdentity method * @see SecurityContextAssociation#pushRunAsIdentity(org.jboss.security.RunAs) */ public boolean login() { RunAsIdentity runAsRole = new RunAsIdentity(roleName, principalName); SecurityContextAssociation.pushRunAsIdentity(runAsRole); pushedRole = true; return true; }