File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HF: page 371, a Entity Bean question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HF: page 371, a Entity Bean question." Watch "HF: page 371, a Entity Bean question." New topic
Author

HF: page 371, a Entity Bean question.

Prashant Neginahal
Ranch Hand

Joined: Sep 14, 2002
Posts: 77
Hi All,

Which method(s) run in the transaction context of the method that causes their invocation?

a) ejbLoad()
b) ejbRemove()
c) ejbSelect()
d) ejbActivate()
e) ejbPassivate()
f) setEntityContext()

Correct answers are a, b,c.

I thought answers are a,d,e. Can somebody please explain it?

Thanks,
Prashant


Thanks, <br />Prashant<br />SCJP, SCBCD
Kin Ng
Greenhorn

Joined: May 06, 2005
Posts: 16
The answer can't be ejbActivate and ejbPassivate.

Because by the time ejbActivate() or ejbPassivate() is called,
the container no longer has you in a meaningful transaction context,
Thus, you can't be in a transaction at that point.

Business methods, home business methods and remove() of entity beans
should be running in transactions. I guess that's why
the answer is a,b,c
Prashant Neginahal
Ranch Hand

Joined: Sep 14, 2002
Posts: 77
Thanx Kin. I understood the question wrongly.

--Prashant
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HF: page 371, a Entity Bean question.
 
Similar Threads
a doubt in mindQ
Answers to my 20 mock questions
www.jiris.com exam blunder
mock exam question
SCEA questions help I