Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock question

 
S. Palanigounder
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should never implement your own ejbStore and ejbLoad
mehtods for CMP entity bean.
1 true
2 false
[ June 03, 2003: Message edited by: S. Palanigounder ]
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We will be actually implementating the ejbLoad and ejbStore method when we implement EntityBean interface but we do not write any data access or update code. We let the container handle it.
It will be better if you modify the Q little bit.
 
Andrew Perepelytsya
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2. false
For CMP beans, the ejbLoad() method is called right after the container loaded the data, and for ejbStore() - it's called right before the container saves the data.
You can use this behaviour, i.e. for logging (during education phase or to tune caching optimisations). One could also compress a field value (say, you have a big text, that you do not need to search through) in ejbStore() and uncompress the value that was loaded from the datastore in ejbLoad().
Something similar can be applied to ejbActivate/ejbPassivate methods as well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic