• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Differences between CMT and BMT

 
raj sekar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
I'm going through the HFEJB book and I got stuck with Brian Power question. Can anybody help on answering the below question for BMT?
" Think about the diff between CMT and BMT
If tied up and forced to pick one over the other which would you pick?
CMT or BMT
Why ?What are the pros and cons?
For CMT,
Pros for Using CMT,
1. It's simpler, supports bean reuse, and is the only way you can do transactions for entity beans.
2. By putting transaction info in the DD, you can deploy same bean multiple times and get different transaction behavior.

Thanks,
Raj
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pros for using BMT
You can have a shorter transactional code i.e. the whole method does not have to be in a transaction.
For SFSB, you can open your transaction in one method and end it in another method - do not know if this an advantage or a disadvantage.
Conclusion; There is no one generaally accepted answer to this, but I will go with CMT because the pros to me outweigh that of BMT.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic