Forums Register Login

HFEJB Q16 page 371

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
hmm.. if you're removing an entity (a row in a db), why would you want to store it?
+Pie Number of slices to send: Send
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
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 688 times.
Similar Threads
SAMPLE QUESTIONS- Part B
about Exception handling.
what are mandatory elements in TLD?
2 AWT Qs, -- please help!
kb Q19 page 283
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 20:39:34.