The explanation for the last option seems off. It basically says the call
Code: Select all
MessageDrivenContext.isCallerInRole()
invoked in onMessage() will return values per the "run-as" configuration of the bean. However, the way I understand it, isCallerInRole will only reflect the run-as identity from method calls made
from onMessage(), not in onMessage() itself. Thus within onMessage(), isCallerInRole always returns false as there is no security context, but from within methods called by onMessage, isCallerInRole will reflect the run-as config on the MDB.