activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r592529 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Stomp/StompHelper.cs
Date Tue, 06 Nov 2007 19:43:55 GMT
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;



Mime
View raw message