Hi ranchers,
Which method(s) from the EntityContext interface be invoked from within the ejbCreate method? (Choose all that apply.)
A. getEJBHome()
B. getEJBObject()
C. getCallerPrincipal()
D. getUserTransaction()
E. setRollbackOnly()
Answer as per the mock exam solutions - A,B,C,E
I think getEJBObject() cannot be called from ejbCreate method because the EJBObject for 'this' bean instance is still not associated with it. It can only be used after entering ejbPostCreate().
So the correct statements should be A,C,E.
Please give your thoughts on this.