Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Mock question

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic