• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Differences between CMT and BMT

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic