This content has been marked as final.
Show 1 reply
-
1. Re: ejbStore called after findByPrimaryKey
dsundstrom Aug 6, 2002 1:42 PM (in response to maku01)It is called before findByPrimaryKey because the ejb specification requires a full synchronization before executing a finder, and it is called after because you may have modified your object between the finder and the end of your code.
You may have modified a local variable in the findByPrimaryKey and then in ejbStore you could store that variable in a persistenct field.
Don't worry about optimizing away the ejbStore methods. They normaly don't do anything so HotSpot just wipes them out. In the JBossCMP implemnentation I assure that all of the callbacks are respected, so users don't get wierd states.
If you run a profiler and prove that this method is really an serious preformance hit to the server, I consider an optimization.