Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

HFEJB Q16 page 371

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question:
Which additional method(s) might the container call when invoking ejbRemove?
A: ejbFind()
B: ejbLoad()
C: ejbStore()
D: ejbActivate()
E: ejbPassivate()
Answer is: B,D
My query is why C is not an answer?
thanks.
-Walk Rustin
 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm.. if you're removing an entity (a row in a db), why would you want to store it?
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Walker,
the container calls ejbStore() when it wants to be in sync (bean vs. entity) but since you are deleting the entity and "zeroing out" the bean and putting it back into the pool, you don't care what the state of the bean is, thus you need to write it's state back to the entity.
let's say you did call ejbStore() to update the state in the db ... then you would turn around and delete the same row from the db? wasted effort.
Hope this helps.
-van
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic