File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Transaction in BMP and CMP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction in BMP and CMP" Watch "Transaction in BMP and CMP" New topic

Transaction in BMP and CMP

Alex GeorgeAlex

Joined: Nov 10, 2006
Posts: 1
Good morning Ladies and Gentlemen,
I am confused by the way BMP and CMP support transactions. Both BMP and CMP support transactions. But why is it that I have to have the code to manage transactions in BMP and not in CMP? Is it true that the container wouldn�t roll back the transaction if a system error thrown? My container let me choose any of the 6 the transaction attributes for BMP and CMP. Any help appreciated.
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

BMP - As a Bean Programmer you have manage transaction.

CMP - Container will do the transaction, but you have to tell container which business methods you want conatiner to execute using DD.

Advantage of BMP is, you can have more flexbility than CMP.

DisAdvantage of BMP is, when you want to change the transaction behaviour you need modify the code.But in CMP, you just need to change the transaction attribute mentioned in DD.


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />
I agree. Here's the link:
subject: Transaction in BMP and CMP
It's not a secret anymore!