A user role looks like "CONTRACT_1" and is assigned to the user by the login module. This interceptor intercepts an EJB that does NOT use @DeclaresRoles to declare any role. I am wandering how does this work since the annotation @DeclaresRoles is used specifically to define the roles that can be used in a isCallerInRole() call? Why doesn't this call return false?
I am using JBOSS 4.2.3.
I am trying to understand how this works especially because I am trying to test my EJBs with OpenEJB, which fails on the line mentioned above if I do not define the role for the EJB with @DeclaresRoles. If I do(by hardcoding the return value in the getId() method), then it works in OpenEJB too, so I am trying to see how JBOSS handled the situation so that I maybe adapt it to my test case.