Hi Reza,
I did some tests, and the results are:
* when a bean is invoked directly from a
servlet, and it has an interceptor, the isCallerInRole() in that interceptor fails
* when a bean is called from another bean, and it has the same interceptor, the call succeeds as expected
So, when the interceptor is called in a "web context", it fails, and when it is called in "ejb context", it behaves right.
Should this happen, or maybe this is a bug in glassfish?
Anyone interested and capable of helping with this, please follow the link I gave to glassfish forums, the topic there has been updated and contains sources, built ear file and some debugging of glassfish internals description.