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 2010/11/11 21:00:14 UTC

svn commit: r1034087 - /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs

Author: tabish
Date: Thu Nov 11 20:00:14 2010
New Revision: 1034087

URL: http://svn.apache.org/viewvc?rev=1034087&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQNET-292

Add the clone method to ensure the Message state is correct and properties aren't set read-only when CopyOnSend is set.


Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs?rev=1034087&r1=1034086&r2=1034087&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs Thu Nov 11 20:00:14 2010
@@ -66,6 +66,14 @@ namespace Apache.NMS.Stomp.Commands
             return thisMsg != null && oMsg != null && oMsg.Equals(thisMsg);
         }
 
+        public override object Clone()
+        {
+            Message cloneMessage = (Message) base.Clone();
+
+            cloneMessage.propertyHelper = new MessagePropertyIntercepter(cloneMessage, cloneMessage.properties, this.ReadOnlyProperties) { AllowByteArrays = false };
+            return cloneMessage;
+        }
+
         public void Acknowledge()
         {
             if(null == Acknowledger)