Page 1 of 1

About Question com.enthuware.ets.scbcd.v5.2.12 : Test 2 - question 45

Posted: Tue May 24, 2011 9:58 am
by ETS User
Hi,
I think explanations given with the answer are incorrects regarding the EJB 3 core specification :
You say :"but getCallerPrincipal() or isCallerInRole() cannot be called by an MDB. "
But the spec. says that we can call getCallerPrincipal() on MessageDrivenContext.
See table 3 p 117 of the spec. and the assertion on p 108 about MessageDrivenContext :"The getCallerPrincipal method returns the java.security.Principal that is associated with the invocation."

I agree that the caller is the container and not a client.

Furthermore, I think there is a mix-up in the explanation about MessageContext (for Jax-PRC Web services) and the MessageDrivenContext interface.

best regards,
Alex

Re: About Question com.enthuware.ets.scbcd.v5.2.12 : Test 2 - question 45

Posted: Tue May 24, 2011 9:27 pm
by admin
This has now been fixed.

thanks for your feedback!