Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi forum!
  • 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

questions about BMT beans

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I had a some questions regarding BMT.
1. How is the container managing the lifetime of the UserTransaction in the Context object? When is it created and when is it destroyed?
2. Does the UserTransaction propagate automatically when a BMT bean calls another BMT bean? And does it propagate when a BMT bean calls a CMT, and vice versa?
3. How can one specify the Transaction Attibute in the ejb-jar-xml for a BMT bean? Do we need to specify "Require" or something?
-David
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I had a some questions regarding BMT.
1. How is the container managing the lifetime of the UserTransaction in the Context object? When is it created and when is it destroyed?
2. Does the UserTransaction propagate automatically when a BMT bean calls another BMT bean? And does it propagate when a BMT bean calls a CMT, and vice versa?
3. How can one specify the Transaction Attibute in the ejb-jar-xml for a BMT bean? Do we need to specify "Require" or something?


1. I guess you mean ejb container does not manager the life time of UserTransaction. The Transaction service is offered by server. Container simply use it.
2. For a BMT to BMT call, the first BMT is considered as a client the second BMT, by spec, the The container suspend any trasaction associated with the client. So the transactin is not propagated.
3. Transacton attribute is for CMT only. BMT control the transaction by code not declaration.
 
A berm makes a great wind break. And we all like to break wind once in a while. Like this tiny ad:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic