activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r831622 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp: ConnectionFactory.cs MessageConsumer.cs PrefetchPolicy.cs
Date Sun, 01 Nov 2009 00:02:53 GMT
Author: tabish
Date: Sun Nov  1 00:02:53 2009
New Revision: 831622

URL: http://svn.apache.org/viewvc?rev=831622&view=rev
Log:
* PrefetchPolicy.cs:
* MessageConsumer.cs:
* ConnectionFactory.cs: 

Additional changes to improve transacted sessions.  Clone the policies when assigned from
the ConnectionFactroy.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/PrefetchPolicy.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs?rev=831622&r1=831621&r2=831622&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs
Sun Nov  1 00:02:53 2009
@@ -104,8 +104,8 @@
 			URISupport.CompositeData c = URISupport.parseComposite(uri);
 			URISupport.SetProperties(connection, c.Parameters, "connection.");
 
-            connection.RedeliveryPolicy = this.redeliveryPolicy;
-            connection.PrefetchPolicy = this.prefetchPolicy;
+            connection.RedeliveryPolicy = this.redeliveryPolicy.Clone() as IRedeliveryPolicy;
+            connection.PrefetchPolicy = this.prefetchPolicy.Clone() as PrefetchPolicy;
             
 			connection.ITransport.Start();
 			return connection;

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs?rev=831622&r1=831621&r2=831622&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
Sun Nov  1 00:02:53 2009
@@ -819,10 +819,7 @@
                     MessageDispatch lastMd = this.dispatchedMessages.First.Value;
                     int currentRedeliveryCount = lastMd.Message.RedeliveryCounter;
                     
-                    if(currentRedeliveryCount > 0) 
-                    {
-                        redeliveryDelay = this.redeliveryPolicy.RedeliveryDelay(currentRedeliveryCount);
-                    }
+                    redeliveryDelay = this.redeliveryPolicy.RedeliveryDelay(currentRedeliveryCount);
                     
                     MessageId firstMsgId = this.dispatchedMessages.Last.Value.Message.MessageId;
 

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/PrefetchPolicy.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/PrefetchPolicy.cs?rev=831622&r1=831621&r2=831622&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/PrefetchPolicy.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/PrefetchPolicy.cs Sun
Nov  1 00:02:53 2009
@@ -24,7 +24,7 @@
     /// Class used to define the various limits that should be used for the Prefetch
     /// limit on destination based on the type of Destination in use.
     /// </summary>
-    public class PrefetchPolicy
+    public class PrefetchPolicy : ICloneable
     {
         public const int MAX_PREFETCH_SIZE = Int16.MaxValue - 1;
         public const int DEFAULT_QUEUE_PREFETCH = 1000;
@@ -88,5 +88,10 @@
         {
             return System.Math.Min(value, MAX_PREFETCH_SIZE);
         }
+
+        public Object Clone()
+        {
+            return this.MemberwiseClone();
+        }
     }
 }



Mime
View raw message