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/01/08 17:24:04 UTC

svn commit: r897251 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp: Commands/MapMessage.cs Protocol/StompWireFormat.cs

Author: tabish
Date: Fri Jan  8 16:23:52 2010
New Revision: 897251

URL: http://svn.apache.org/viewvc?rev=897251&view=rev
Log:
Make a few changes to start preping for MapMessage support.

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

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs?rev=897251&r1=897250&r2=897251&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs Fri Jan  8 16:23:52 2010
@@ -41,10 +41,7 @@
 
         public override bool ReadOnlyBody
         {
-            get
-            {
-                return base.ReadOnlyBody;
-            }
+            get { return base.ReadOnlyBody; }
 
             set
             {
@@ -64,21 +61,25 @@
             {
                 if(this.body == null)
                 {
-                    if(this.Content != null && this.Content.Length > 0)
-                    {
-                        MemoryStream buffer = new MemoryStream(this.Content);
-                        this.body = PrimitiveMap.Unmarshal(buffer);
-                    }
-                    else
-                    {
-                        this.body = new PrimitiveMap();
-                    }
-
+                    this.body = new PrimitiveMap();
                     this.typeConverter = new PrimitiveMapInterceptor(this, this.body);
                 }
 
                 return this.typeConverter;
             }
+
+            set
+            {
+                this.body = value as PrimitiveMap;
+                if(value != null)
+                {
+                    this.typeConverter = new PrimitiveMapInterceptor(this, value);
+                }
+                else
+                {
+                    this.typeConverter = null;
+                }
+            }
         }
 
         public override void BeforeMarshall(StompWireFormat wireFormat)

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs?rev=897251&r1=897250&r2=897251&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs Fri Jan  8 16:23:52 2010
@@ -401,8 +401,9 @@
             }
 
             // ActiveMQ extensions to STOMP
+            frame.SetProperty("transformation", "jms-map-xml");
             frame.SetProperty("activemq.dispatchAsync", command.DispatchAsync);
-            
+
             if(command.Exclusive)
             {
                 frame.SetProperty("activemq.exclusive", command.Exclusive);