private void addSecurityIdentityAnnotation(EJBContainer container,
SecurityIdentityMetaData identity)
{
if (identity != null && !identity.isUseCallerId())
{
RunAsMetaData runAs = identity.getRunAs();
RunAsImpl annotation = null;
if (runAs != null)
{
annotation = new RunAsImpl(runAs.getRoleName());
addClassAnnotation(container, annotation.annotationType(),
annotation);
}
String runAsPrincipal = identity.getRunAsPrincipal();