MessageQueueTransaction.Abort 方法

定义

回滚正挂起的内部事务。Rolls back the pending internal transaction.

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

异常

您正尝试回滚的内部事务尚未开始。The internal transaction you are attempting to roll back has not started.

发生内部消息队列错误。An internal Message Queuing error occurs.

注解

Abort标记在调用Begin时开始的进程的未成功完成。Abort marks the unsuccessful completion of a process begun at a call to Begin.

通常, 一种方式是在Begin Try...Catch异常处理块中调用, 并AbortTry子句中放置Commit对的调用, 并在Catch子句中调用。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.

Abort回滚整个事务。Abort rolls back the entire transaction. 这包括调用Begin后发送或接收的所有消息。This includes all messages sent or received after the call to Begin.

适用于

另请参阅