dcsimg
CMP vs BMP
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kamlesh_Waghmare
Posted On:   Monday, February 11, 2002 09:20 PM

In our project , we are using Bean Managed Persistence Beans. Why not CMPs.Actually, We are using transactions programatically. that's why we are using BMP's.

If anybody knows about other reasons, pl. respond to this mail.

Regards & thanx,

Kamlesh.

Re: CMP vs BMP

Posted By:   bharani_iyer  
Posted On:   Tuesday, February 12, 2002 03:10 AM

Hi,


You could have more than one reason for choosing BMP over CMP.

Some of them are listed below. However if you want to have a detailed study of each of the approaches, the pros & cons of them, then i would recommend the book Mastering EJB 2 by Ed Roman for reference.

BMP gives you ultimate control over JDBC, and thus you have unlimited flexibility for how you persist objects to the database. For CMP, many containers support complex mappings, but some containers don't!

If you have complicated queries across multiple tables with joins etc, BMP fits the bill.

Secondly debugging CMP code might be a lot more difficult coz you really don't know what is happening behind the scenes when error condition occurs.
Everything is controlled by the container for you.


Cheers,

bharani.
About | Sitemap | Contact