Share via


ITransactionOutcomeEvents

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

This interface is used by application programs that require asynchronous notification about transaction outcomes. The application program implements the methods in this interface and registers the interface with the connection point mechanism. DTC calls the appropriate method on this interface to inform the application about the outcome of a transaction.

When to Implement

An application program needs to implement this interface if it requires asynchronous notification about transaction outcomes.

When to Use

Application programs us this interface to obtain asynchronous notification about transaction outcomes.

Methods in Vtable Order

ITransactionOutcomeEvents methods Description
Committed Raises an event when the transaction commits.
Aborted Raises an event when the transaction aborts.
HeuristicDecision Raises an event when one of the participants in the transaction chose to heuristically decide the outcome of the transaction.
Indoubt Raises an event when the outcome of the transaction is in-doubt.

Remarks

Typically, ITransaction::Commit or Abort calls are performed synchronously. This means that the calling thread is blocked until DTC makes a commit or abort decision (usually at the end of phase one of the two-phase commit protocol).

It is possible to avoid blocking the calling thread by using asynchronous Commit or Abort calls. Asynchronous Commit or Abort require the following:

  1. The programmer creates an OLE event sink object that implements the ITransactionOutcomeEvents interface.

  2. The programmer uses the OLE events architecture on the DTC transaction object to register the event sink.

  3. Calls to ITransaction::Commit are passed the value XACTTC_ASYNC in the grfTC parameter. Calls to ITransaction::Abort are passed a Boolean flag of TRUE in the fAsync parameter. Neither call blocks the calling thread.

  4. After the transaction commits or aborts, the ITransactionOutcomeEvents::Committed or ITransactionOutcomeEvents::Aborted method is called on the registered event sink.

The ITransactionOutcomeEvents events are raised when the transaction's outcome is known. On the root transaction manager's system, the transaction outcome event is raised at the end of phase one. On the subordinate transaction managers' systems, the transaction outcome events are raised at the beginning of phase two.

Requirements

For an explanation of the requirement values, see Requirements (Component Services).

Platforms: Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista

Header: Declared in transact.h

See Also

ITransaction