Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two phase commits for EJBs

 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should all vendors support Two phase commits for EJBs?.
I understand two-phase commit as being for distributed databases.
But can somebody give me a practical scenario where two phase commits are used for EJBs, please. Just an example would do.
thanx,
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two-phase commit, as a protocol for distributed transactions, could be used where multiple distributed *participants* are involved in the transaction, which could be anything -- another EJB server, a couple of different databases, etc. So it's just the way the transaction manager (as part of the server) can make sure that all participants have agreed to commit (phase one) before TELLING them to go ahead and do it (phase two).
Two-phase commit is not absolutely mandated as the protocol for EJB servers to use, but it is one example (by far, the most typical) of an implementation of distributed transaction management.
cheers,
Kathy
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This image is explain about two phase commit.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic