• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transaction question

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why is it that they(study notes and exam pointers in book) always say that "A BMT bean must never start a tx before completing the previous one." I thought nested transactions werent allowed in EJB (CMT or BMT), so why do they specifically have to say "BMT"??
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats because you define the transaction boundary in BMT. With CMT you define the methods that should have a transaction and you define what type of transaction it is. So an overlap of transactions here is not possible. When you call other methods they must define what kind of transaction they want (in CMT).

With BMT you use the start() commit() and rollback() methods to define the boundary and thus using start() twice would amount to a nested transaction.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you answered your own question. Nested transaction are not allowed. In case Of BMT - you started it - you finish it.
In CMT container will take care
 
Tontang Bei
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ohhhhhhhh..thanks to you both.
reply
    Bookmark Topic Watch Topic
  • New Topic