aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Two phase commits for EJBs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Two phase commits for EJBs" Watch "Two phase commits for EJBs" New topic
Author

Two phase commits for EJBs

Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
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
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
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

Joined: Jul 04, 2003
Posts: 1312
This image is explain about two phase commit.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
 
Consider Paul's rocket mass heater.
 
subject: Two phase commits for EJBs