Forums Register Login

ejbLoad and ejbStore

+Pie Number of slices to send: Send
I have read once that ejbLoad and ejbStore are called before and after every business method call for a CMP entity bean. But recently I read that they are called before and after every transaction. Now my doubt is this. If two business methods of a CMP entity bean are called as part of a same client-initiated transaction will ejbLoad and ejbStore be called only once for the 2 methods or once before the first method invocation and once after the second ?
Please advise.
Thank You
Seema
+Pie Number of slices to send: Send
This depends on the container implementation. A container is free to call store and load every time it feels it is required to synchronise the data. If you have an intellegent container then it may be optimised to only call once per transaction but it is completely possible within the EJB specification for it to synchronise every method call
The happiness of your life depends upon the quality of your thoughts -Marcus Aurelius ... think about this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 589 times.
Similar Threads
Contradiction in Head First EJB ?
CMP load and store
Entity bean question - HFEJB pag 364, exe: 10!
Entity Beans ejbStore and ejbLoad over head
ejbLoad() and ejbStore()
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:37:37.