• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

How JTA Transaction work in the context of EJBs ?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Could any one of explain this
Describe how JTA transactions work in the context of EJBs and the application server in which they are deployed
Thanks in adv,
Bala balas@lucid.co.in
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JTA transactions are synonymous with bean managed transaction. First you specify in the deployment descriptor that the transactions will be managed by the beans(EJB impl). Then in the implementation, you will use JTA specific calls to create a transaction context, begin the transaction, and finally commit or rollback as the case may be. The important thing to remember is, you are in control of transaction boundaries and you decide when to commit and rollback. Container is not responsible for( and will not ) manipulate your transaction.
By the way, BMTs are inherently error prone and should be implemented only when inevitable. It is best to let the container manage all transactions( using JTS ) because it is not only easy, but more maintainable since you will not have transaction-specific semantics intermingled with business logic code.
Cheers,
 
The fastest and most reliable components of any system are those that are not there. Tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic