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.