Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Two phase commits for EJBs

 
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,
 
Cowgirl and Author
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
 
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
 
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic