Question:
What is the difference between ejbStore() and ejbLoad()?
Answer:
ejbStore() will be called before ejbPassivate() and is used to store the object to persistent database.
ejbLoad() will be called before ejbActivate() and is used to retrieve the object from persistence datastore.
Submitted by Balasubramanyam Duvvuri ( balasubramanyam.duvvuri @ wipro . com ) Source: CoolInterview.com
There is no connection between ejPassivate() and ejbActivate()methods and ejbLoad() and ejbStore(). The load and store methods can be called any number of times and in any order between the passivte() and activate() methods for retrieving and saving data onto the persistent data store Source: CoolInterview.com
Answered by: Stephen | Date: 10/18/2009
| Contact Stephen
The container always calls elbLoad() after ejbActivate and ejbStore() after ejbPassivate. The ejb container can call ejbLoad() and ejbStore() at other times also. Basically when the bean is loaded with persistence data, the ejbLoad() is called and ejbStore() is called when the database is loaded or updated with data. Source: CoolInterview.com
Answered by: Arun | Date: 1/13/2010
| Contact Arun
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|