AssemblyDescriptorMetaData assemblyDescriptor = applicationMetaData.getAssemblyDescriptor();
String roleName = ejbTimeoutIdentity.getRunAsRoleName();
String principalName = ejbTimeoutIdentity.getRunAsPrincipalName();
// the run-as principal might have extra roles mapped in the assembly-descriptor
Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
RunAs runAsIdentity = new RunAsIdentity(roleName, principalName, extraRoleNames);
SecurityActions.pushRunAsIdentity(runAsIdentity);
pushedRunAs = true;
}
container.invoke(inv);
}