posted 23 years ago
Hi Aamir,
Regarding your doubt about BMP and CMP I hope this helps you:
1.)Bean Managed Persistence is selected under cases where the complexity of queries with the backend is more where you would like to handle the JDBC/SQL operations on your own.
2.)Container Managed Persistence is used when we go for simple lookup operations in database.
Thus in BMP its you who will have to manage everything but in CMP its as follows:
The CMP entity beans allows the container to handle some or all of its data access logic.Rather than coding JDBC/SQL operations in your bean class ,your container implicitly performs all database operations behind the scenes.
With CMP ,you must make some of your entity bean class's fields public so that the container can set the fields when it performs database operations on behalf of your bean.
Thus CMP handles everything on your behalf(such as Transaction Management,Database connection pooling,security etc,).
Well its vast to explain this ...but hope this gives you some idea and if any more info you are always welcomed.
Rgds,
Poornima.