You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2011/04/15 22:15:21 UTC

svn commit: r1092800 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp: NetTxSession.cs TransactionContext.cs

Author: tabish
Date: Fri Apr 15 20:15:21 2011
New Revision: 1092800

URL: http://svn.apache.org/viewvc?rev=1092800&view=rev
Log:
Minor tweak to the tx entry code to prevent an unnecessary wait when no Tx is actually in play.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxSession.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/TransactionContext.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxSession.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxSession.cs?rev=1092800&r1=1092799&r2=1092800&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxSession.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxSession.cs Fri Apr 15 20:15:21 2011
@@ -90,7 +90,7 @@ namespace Apache.NMS.ActiveMQ
             // If an Async DTC operation is in progress such as Commit or Rollback
             // we need to let it complete before deciding if the Session is in a TX
             // otherwise we might error out for no reason.
-            TransactionContext.DtcWaitHandle.WaitOne(TimeSpan.FromMilliseconds(1000), true);
+            TransactionContext.DtcWaitHandle.WaitOne();
 
             if(TransactionContext.InNetTransaction)
             {

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/TransactionContext.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/TransactionContext.cs?rev=1092800&r1=1092799&r2=1092800&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/TransactionContext.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/TransactionContext.cs Fri Apr 15 20:15:21 2011
@@ -199,7 +199,7 @@ namespace Apache.NMS.ActiveMQ
 
         #region Transaction Members used when dealing with .NET System Transactions.
 
-        private readonly ManualResetEvent dtcControlEvent = new ManualResetEvent(false);
+        private readonly ManualResetEvent dtcControlEvent = new ManualResetEvent(true);
 
         public bool InNetTransaction
         {