If all of your assumptions are correct, then you conclusion is correct, but your assumptions may not be correct.
I've been surprised to find the WebSphere Application Server do a bunch of shortcuts with db2 that I never expected. Voodoo and magic for sure, but some transactions that I would expect to happen in multiple steps often happen in less than one. Okay, in one, but still, it's impressive. Maybe IBM does know more about their software than I do?
I love going into a shop and maintaining the custom BMPs some super-genious created to perform a millisecond faster than a CMP. The code is never commented, totally indecipherable, and impossible for a mere-mortal like myself to maintain. The consulting $$$ just keep piling up.
The most important aspect of any enterprise application is the long-term maintainability of the code. A CMP, with no code in it, is much easier to maintain that a component with lots of code in it.
Here's some more info on the benefits and drawbacks of BMPs and CMPs.
I am a beginner in the field of EJBs.About the current thread i would like to float an idea. All the database access code in CMP is written by the container. Also the container starts a transaction locks the entity in the database and does all the updates only once before the end of the transaction. So wont it be more efficient to club updates to all the fields in a single call something like
update tablename set col1=value1,col2=value2....where primarykey=primarykeyvalue
also more efficient would be to only update the fields that have been modified or only update the fields if the entity has been modified
Thanks and Regards<br />Harsh Gupta<br />SCJP 1.4 (95%)<br />SCDJWS--(Prep)