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

About Distributed Transactions

Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am aware of JDBC transactions. Now while reading EJB i came to know that EJB supports Distributed Transactions.

My interpretation of Distributed transaction is

Consider two CMT Beans A & B.
Bean-A contains a method foo() with a transaction attribute "Required".
Bean-B contains a method boo() with a transaction attribute "Required".

Now when a method "foo()" in a transaction calls method "boo()", the method "boo()" runs in the same transaction as "foo()". so here the transaction travels from "foo()" method to "boo()" method.

My Question: can i say the above is an example of Distributed transaction

Please let me know my interpretation is correct or wrong.

If wrong, please explain me in few words.
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not exactly

A distributed transaction is an operation, in which two or more network hosts are involved. Usually, hosts provide transactional resources, while the transaction manager is responsible for creating and managing the transaction.

It is achieved by something known as 2 phase commit. The resource's driver should support it.

Check out this link:


It has a good discussion about it.

Hope it is helpful.
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic