activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1034087 - /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs
Date Thu, 11 Nov 2010 20:00:14 GMT
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)



Mime
View raw message