You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2007/11/06 20:43:55 UTC

svn commit: r592529 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Stomp/StompHelper.cs

Author: chirino
Date: Tue Nov  6 11:43:46 2007
New Revision: 592529

URL: http://svn.apache.org/viewvc?rev=592529&view=rev
Log:
Fix so that the .NET client can use temp topics against ActiveMQ

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Stomp/StompHelper.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Stomp/StompHelper.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Stomp/StompHelper.cs?rev=592529&r1=592528&r2=592529&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Stomp/StompHelper.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Stomp/StompHelper.cs Tue Nov  6 11:43:46 2007
@@ -54,7 +54,15 @@
 				text = text.Substring("/temp-queue/".Length);
 				type = ActiveMQDestination.ACTIVEMQ_TEMPORARY_QUEUE;
 			}
-			return ActiveMQDestination.CreateDestination(type, text);
+            else if (text.StartsWith("/remote-temp-topic/"))
+            {
+                type = ActiveMQDestination.ACTIVEMQ_TEMPORARY_TOPIC;
+            }
+            else if (text.StartsWith("/remote-temp-queue/"))
+            {
+                type = ActiveMQDestination.ACTIVEMQ_TEMPORARY_QUEUE;
+            }
+            return ActiveMQDestination.CreateDestination(type, text);
 		}
 
 		public static string ToStomp(ActiveMQDestination destination)
@@ -71,10 +79,24 @@
 						return "/topic/" + destination.PhysicalName;
 					
 					case DestinationType.TemporaryTopic:
-						return "/temp-topic/" + destination.PhysicalName;
+                        if (destination.PhysicalName.StartsWith("/remote-temp-topic/"))
+                        {
+                            return destination.PhysicalName;
+                        }
+                        else 
+                        {
+                            return "/temp-topic/" + destination.PhysicalName;
+                        }
 					
 					case DestinationType.TemporaryQueue:
-						return "/temp-queue/" + destination.PhysicalName;
+                        if (destination.PhysicalName.StartsWith("/remote-temp-queue/"))
+                        {
+                            return destination.PhysicalName;
+                        }
+                        else 
+                        {
+                            return "/temp-queue/" + destination.PhysicalName;
+                        }
 					
 					default:
 						return "/queue/" + destination.PhysicalName;