commit


Description:

public bool commit (out SList<Connection> cnc_to_recover) throws Error

Commits a distributed transaction (managed by this).

The commit is composed of two phases:

  • a PREPARE phase where all the connections are required to store their transaction data to a permanent place (to be able to complete the commit should a problem occur afterwards)
  • a COMMIT phase where the transaction data is actually written to the database

If the PREPARE phase fails for any of the connection registered with this, then the distributed commit fails and FALSE is returned. During the COMMIT phase, some commit may actually fail but the transaction can still be completed because the PREPARE phase succeeded (through the recover method).

Parameters:

this

a XaTransaction object

cnc_to_recover

a place to store the list of connections for which the commit phase failed, or null

Returns:

TRUE if no error occurred (there may be some connections to recover, though)