Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HF-EJB book. Page 366 - Q18, Need explaination

 
Srivatsa Katta
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

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.

Regards,
Tripter
 
Purav Gandhi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!