当前位置: 首页>>代码示例>>C#>>正文


C# SinglePhaseEnlistment.Done方法代码示例

本文整理汇总了C#中System.Transactions.SinglePhaseEnlistment.Done方法的典型用法代码示例。如果您正苦于以下问题:C# SinglePhaseEnlistment.Done方法的具体用法?C# SinglePhaseEnlistment.Done怎么用?C# SinglePhaseEnlistment.Done使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Transactions.SinglePhaseEnlistment的用法示例。


在下文中一共展示了SinglePhaseEnlistment.Done方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Rollback

 public void Rollback(SinglePhaseEnlistment singlePhaseEnlistment)
 {
     singlePhaseEnlistment.Done();
 }
开发者ID:areicher,项目名称:NServiceBus.RavenDB,代码行数:4,代码来源:FakePromotableResourceManager.cs

示例2: Dispose

 ///<summary>
 /// Attempt to rollback the internal transaction.
 ///</summary>
 void IPromotableSinglePhaseNotification.Rollback(SinglePhaseEnlistment singlePhaseEnlistment)
 {
     try
     {
         // attempt to rollback the transaction
         this.dbTransaction.Rollback();
         singlePhaseEnlistment.Done();
     }
     finally
     {
         // clean-up our resources
         Dispose();
     }
 }
开发者ID:JuRogn,项目名称:OA,代码行数:17,代码来源:AdoWorkBatchService.cs

示例3: SinglePhaseCommit

 public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
 {
     try
     {
         Commit();
         singlePhaseEnlistment.Done();
     }
     catch (Exception)
     {
         //on a callback thread, can't throw
     }
 }
开发者ID:hibernating-rhinos,项目名称:rhino-queues,代码行数:12,代码来源:TransactionEnlistment.cs

示例4: SinglePhaseCommit

 public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
 {
     try
     {
         PerformActualCommit();
         singlePhaseEnlistment.Done();
     }
     catch (Exception e)
     {
         logger.Warn("Failed to commit enlistment " + Id, e);
         throw;
     }
     finally
     {
         onCompelete();
     }
 }
开发者ID:stantoxt,项目名称:rhino-queues,代码行数:17,代码来源:TransactionEnlistment.cs

示例5: SinglePhaseCommit

 public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
 {
     #if DEBUG
     System.Diagnostics.Trace.WriteLine("NuoDbTransaction::SinglePhaseCommit()");
     #endif
     Commit();
     singlePhaseEnlistment.Done();
 }
开发者ID:helluvamatt,项目名称:nuodb-dotnet,代码行数:8,代码来源:NuoDbTransaction.cs

示例6: SinglePhaseCommit

        public void SinglePhaseCommit(SinglePhaseEnlistment enlistment)
        {
            lock (this.syncObject)
            {
                try
                {
                    Tracer.Debug("Single Phase Commit notification received for TX id: " + this.transactionId);

                    if (this.transactionId != null)
                    {
                        BeforeEnd();

                        // Now notify the broker that a new XA'ish transaction has completed.
                        TransactionInfo info = new TransactionInfo();
                        info.ConnectionId = this.connection.ConnectionId;
                        info.TransactionId = this.transactionId;
                        info.Type = (int) TransactionType.CommitOnePhase;

                        this.connection.CheckConnected();
                        this.connection.SyncRequest(info);

                        Tracer.Debug("Transaction Single Phase Commit Done TX id: " + this.transactionId);

                        // if server responds that nothing needs to be done, then reply done.
                        enlistment.Done();

                        AfterCommit();
                    }
                }
                catch (Exception ex)
                {
                    Tracer.DebugFormat("Transaction[{0}] Single Phase Commit failed with error: {1}",
                                       this.transactionId, ex.Message);
                    AfterRollback();
                    enlistment.Done();
                    try
                    {
                        this.connection.OnException(ex);
                    }
                    catch (Exception error)
                    {
                        Tracer.Error(error.ToString());
                    }
                }
                finally
                {
                    this.currentEnlistment = null;
                    this.transactionId = null;
                    this.netTxState = TxState.None;

                    this.dtcControlEvent.Set();
                }
            }
        }
开发者ID:Redi0,项目名称:meijing-ui,代码行数:54,代码来源:TransactionContext.cs


注:本文中的System.Transactions.SinglePhaseEnlistment.Done方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。