• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question from HFEJB coffee cram mock exam

 
Steven Gao Song
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone,

Page 364, HFEJB, there is a question saying:

What's 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.


The answer says that load, store and business methods can be called
by the container in any order.
I am confused about that. Can anyone give me an example to explain?


by the way, the answer mentioned (spec: 169), does it means Page169 in
Enterprise JavaBeans Specification Page169?

I cannot find anything
talking about it in the Spec P169. Please help.


Thank you.
 
vinod balaji
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone,

Page 364, HFEJB, there is a question saying:

What's 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.


The answer says that load, store and business methods can be called
by the container in any order.
I am confused about that. Can anyone give me an example to explain?


by the way, the answer mentioned (spec: 169), does it means Page169 in
Enterprise JavaBeans Specification Page169?

I cannot find anything
talking about it in the Spec P169. Please help.


Thank you.


ejbLoad to get the updated data from Database(or other persistent storage) and ejbStore to store the date. These are used for automatic syncronization which is feature of entity beans.

these both can be called in any order. but ejbLoad has to be called after ejbActivate and ejbStore before ejbPassivate. see PgNo 353 in HFEJB.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic