posted 8 years ago
For this question, there are two model answers :
option b : annotate method processLicense with @RolesAllowed( {"CORPORATECUSTOMER" , "CUSTOMER" }....);
option d: if EJBContext.isCallerInRole("CORPORATECUSTOMER") return true.....
I think for option b, it should be @DeclareRoles instead.
According to session 17.2.5.3, the roles declared in @DeclareRoles can be tested with isCallerInRole.