activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r693525 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp: Connection.cs MessageConsumer.cs Session.cs
Date Tue, 09 Sep 2008 17:41:30 GMT
Author: jgomes
Date: Tue Sep  9 10:41:29 2008
New Revision: 693525

URL: http://svn.apache.org/viewvc?rev=693525&view=rev
Log:
Change MessageConsumer from starting async delivery when should only register a consumer dispatcher.
Fixes [AMQNET-111]. (See https://issues.apache.org/activemq/browse/AMQNET-111)

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Connection.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Session.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Connection.cs?rev=693525&r1=693524&r2=693525&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Connection.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Connection.cs
Tue Sep  9 10:41:29 2008
@@ -111,7 +111,7 @@
 			{
 				foreach(Session session in sessions)
 				{
-					session.StartAsyncDelivery(null);
+					session.StartAsyncDelivery();
 				}
 			}
 		}
@@ -164,7 +164,7 @@
 
 			if(IsStarted)
 			{
-				session.StartAsyncDelivery(null);
+				session.StartAsyncDelivery();
 			}
 
 			sessions.Add(session);

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs?rev=693525&r1=693524&r2=693525&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs
Tue Sep  9 10:41:29 2008
@@ -90,7 +90,7 @@
 			add
 			{
 				listener += value;
-				session.StartAsyncDelivery(dispatcher);
+				session.RegisterConsumerDispatcher(dispatcher);
 			}
 			remove { listener -= value; }
 		}

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Session.cs?rev=693525&r1=693524&r2=693525&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0/src/main/csharp/Session.cs Tue
Sep  9 10:41:29 2008
@@ -604,13 +604,8 @@
 			}
 		}
 
-		internal void StartAsyncDelivery(Dispatcher dispatcher)
+		internal void StartAsyncDelivery()
 		{
-			if(dispatcher != null)
-			{
-				dispatcher.SetAsyncDelivery(dispatchingThread.EventHandle);
-			}
-
 			if(!startedAsyncDelivery)
 			{
 				this.dispatchingThread.ExceptionListener += this.dispatchingThread_ExceptionHandler;
@@ -618,5 +613,10 @@
 				startedAsyncDelivery = true;
 			}
 		}
+
+		internal void RegisterConsumerDispatcher(Dispatcher dispatcher)
+		{
+			dispatcher.SetAsyncDelivery(this.dispatchingThread.EventHandle);
+		}
 	}
 }



Mime
View raw message