• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • salvin francis
  • Frits Walraven
  • Piet Souris

Differences between CMT and BMT

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?
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.

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.
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic