Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Distributed Transactions

 
NareshAnkuskani Kumar
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • 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

e.g.
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.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • 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:

http://www.theserverside.com/discussions/thread.tss?thread_id=21385

It has a good discussion about it.

Hope it is helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic