Επεξεργασία

Κοινή χρήση μέσω


MessageQueueTransaction.Commit Method

Definition

Commits a pending internal transaction.

public:
 void Commit();
public void Commit ();
member this.Commit : unit -> unit
Public Sub Commit ()

Exceptions

The transaction you are trying to commit has not started.

An internal Message Queuing error occurs.

Remarks

Commit marks the successful completion of processing begun at a call to Begin. If an exception occurs between the call the Begin and the call to Commit, the entire transaction is rolled back. This includes all messages sent or received after the call to Begin.

Typically, one makes a call to Begin within a Try...Catch exception-handling block, putting a call to Commit in the Try clause, and a call to Abort in the Catch clause.

Applies to

See also