private int process(RoleGroup callerRoles)
{
int result = AuthorizationContext.DENY;
EJBXACMLUtil util = new EJBXACMLUtil();
try
{
RequestContext requestCtx = util.createXACMLRequest(this.ejbName,
this.ejbMethod, this.ejbPrincipal, callerRoles);
PolicyDecisionPoint pdp = util.getPDP(policyRegistration, this.policyContextID);
if(pdp == null)
throw PicketBoxMessages.MESSAGES.invalidNullProperty("PDP");
ResponseContext response = pdp.evaluate(requestCtx);
result = response.getDecision() == XACMLConstants.DECISION_PERMIT ?
AuthorizationContext.PERMIT : AuthorizationContext.DENY;
}
catch(Exception e)
{
PicketBoxLogger.LOGGER.debugIgnoredException(e);
result = AuthorizationContext.DENY;
}
return result;
}