File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HFB p.369 q.10 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HFB p.369 q.10" Watch "HFB p.369 q.10" New topic

HFB p.369 q.10

Vince Hon
Ranch Hand

Joined: Feb 11, 2003
Posts: 117
HFB p.369 q.10
What is true for a CMP bean in the ready state ?

A. Its ejbLoad() can be called directly after ejbStore.
B. Its ejbStore() can be called directly after a business method.
C. One of its business methods can be called directly after ejbStore.
D. None of the above.

Ans: A, B, C.

I understand why A, B, C are correct. I get the ans in HFB p.352 and p. 356. However, the explanation of the book is:

The point is: load, store and biz methods can be called by the Container in any order

Why in any order ?
Is it mean that following situation will happen ?
Client called biz methods
ejbStore() //store called /*before*/ bizMethods
//may called ejbPassivate() ...

The above seq is different on book p. 352

Vince Hon<br /> <br />SCJP 1.4 | SCWCD | SCBCD <br /><a href="" target="_blank" rel="nofollow"></a>
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
Hi Vince,

Check out the EJB 2.0 specifications, page 169, 3rd bullet point. It is stated that business methods can be invoked 0 or more times while ejbLoad & ejbStore can be arbitrarily mixed with the invocations of business methods.

Hope this helps.

SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
I agree. Here's the link:
subject: HFB p.369 q.10
jQuery in Action, 3rd edition