enterpriseBean.getEjbName(),
remoteBean.getSecurityRoleRef(),
componentPermissions);
// RunAs subject
SecurityIdentity securityIdentity = remoteBean.getSecurityIdentity();
if (securityIdentity != null && securityIdentity.getRunAs() != null) {
String runAsName = securityIdentity.getRunAs();
if (runAsName != null) {
Subject runAsSubject = (Subject) securityConfiguration.getRoleDesignates().get(runAsName);
if (runAsSubject == null) {
throw new DeploymentException("No role designate found for run-as name: " + runAsName);
}