Friday, March 13, 2009

What is 2 phase commit? (JDBC)

Question :What is 2 phase commit? (JDBC)
Answer :A 2-phase commit is an algorithm used to ensure the integrity of a
committing transactionIn Phase 1, the transaction coordinator contacts
potential participants in the transaction. The participants all agree to make
the results of the transaction permanent but do not do so immediately. The
participants log information to disk to ensure they can complete Phase 2. If
all the participants agree to commit, the coordinator logs that agreement
and the outcome is decided. The recording of this agreement in the log
ends Phase
In Phase 2, the coordinator informs each participant of the decision, and
they permanently update their resources.

No comments: