aspose 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 Spring in Action this week in the Spring 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
 
 
subject: HF: page 371, a Entity Bean question.