File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction in BMP and CMP" Watch "Transaction in BMP and CMP" New topic
Author

Transaction in BMP and CMP

Alex GeorgeAlex
Greenhorn

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.

HTH,


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
 
 
subject: Transaction in BMP and CMP