SecurityContext currentSC = SecurityActions.getSecurityContext();
if (SecurityActions.getSecurityManagement(currentSC) == null)
SecurityActions.setSecurityManagement(currentSC, securityManagement);
AbstractEJBAuthorizationHelper authorizationHelper = SecurityHelperFactory.getEJBAuthorizationHelper(sc);
authorizationHelper.setPolicyRegistration(container.getPolicyRegistration());
isAuthorized = SecurityActions.authorize(authorizationHelper, ejbName, ejbMethod, mi.getPrincipal(),
mi.getType().toInterfaceString(), ejbCS, caller, callerRunAsIdentity, container.getJaccContextID(),
new SimpleRoleGroup(methodRoles));