-----Original Message-----
....
Take the following scenario: three systems are participating in a
two-phases commit. All three systems pass phase 1 and agree to commit.
Then phase two begins. System 1 commits. System 2 commits. But system
three has crashed and does not commit.
The two-phased commit is broken.
---------------------------------
No, not quite ...
2PC does not guarantee that all data will be available all
the time. It guarantees that all available data is consistent.
(there are some other guarantees also).
In your example , System 3 *will* eventually commit - but
not until it restarts. (We know this since System 3 got through
phase 1.). Furthermore, System 3 will not serve data up
to anyone until it has committed; i.e. applications will
have a consistent view of the data.
This behaviour depends on correct implementation of 2PC both
at System 3 and in the transaction co-ordinator (at restart
time, System 3 will detect a local prepared but uncommitted
transaction and will ask the co-ordinator for the outcome; if
by some chance the co-ordinator is unavailable or has forgotten
about the transaction, the operator will need to get involved)
It's entirely possible that there are app servers and resource
managers out there that don't do this correctly. These folks
have marketing and/or technical issues to address :-)
Pat Stephenson
CTO, Laminar Software.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".