• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejbLoad and ejbStore

 
seema mani
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Karl Laird
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!