Hi Ranchers,
I can't understand the following questions (and answer) from enthuware:
What does the method isCallerInRole do?
a) It tests whether the caller of the bean belongs to the role that is passed as a parameter to this method.
b) It tests whether the caller's role exists in the application's security domain.
c) It tests whether the caller exists in the roles defined by the beans.
d) It tests whether the role passed in as a parameter exists in the application's security domain.
Enthuware says that answer a) is correct, but I don't think that there is a role-parameter which is passed into the method. There is only a @RolesAllowed annotation, which defines the roles that are able to execute the method. So, I think that option c) is the correct one.
Can someone please explain me this?