Can someone explain me this question in HF-EJB book. Page 366 - Q18
Which method(s) run in the transaction context of the method that causes their invocation? (Choose all that apply)
A) ejbLoad(); B) ejbRemove(); C) ejbSelect(); D) ejbActivate(); E) ejbPassivate(); F) setEntityContext();
Thanks a lot in advance.
posted 11 years ago
Let me explain you the most obvious of the three answers.
ejbLoad(), ejbRemove(), ejbSelect()
These methods should always run in the transaction context of the method that calls it as 2 & 3 operations are database operations. This operation is called by the client as and when required, so this has to be in the same transaction