Author: clebert.suconic(a)jboss.com
Date: 2010-05-10 17:31:57 -0400 (Mon, 10 May 2010)
New Revision: 9221
Modified:
trunk/src/main/org/hornetq/jms/client/HornetQDestination.java
Log:
https://jira.jboss.org/jira/browse/HORNETQ-384 - Fixing a joram test
Modified: trunk/src/main/org/hornetq/jms/client/HornetQDestination.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQDestination.java 2010-05-10 21:13:40 UTC
(rev 9220)
+++ trunk/src/main/org/hornetq/jms/client/HornetQDestination.java 2010-05-10 21:31:57 UTC
(rev 9221)
@@ -48,8 +48,12 @@
public static final String JMS_QUEUE_ADDRESS_PREFIX = "jms.queue.";
+ public static final String JMS_TEMP_QUEUE_ADDRESS_PREFIX =
"jms.tempqueue.";
+
public static final String JMS_TOPIC_ADDRESS_PREFIX = "jms.topic.";
-
+
+ public static final String JMS_TEMP_TOPIC_ADDRESS_PREFIX =
"jms.temptopic.";
+
private static final char SEPARATOR = '.';
protected static String escape(final String input)
@@ -75,6 +79,18 @@
return createTopic(name);
}
+ else if (address.startsWith(HornetQTemporaryQueue.JMS_TEMP_QUEUE_ADDRESS_PREFIX))
+ {
+ String name =
address.substring(HornetQTemporaryQueue.JMS_TEMP_QUEUE_ADDRESS_PREFIX.length());
+
+ return new HornetQTemporaryQueue(address, name, null);
+ }
+ else if (address.startsWith(HornetQTemporaryTopic.JMS_TEMP_TOPIC_ADDRESS_PREFIX))
+ {
+ String name =
address.substring(HornetQTemporaryTopic.JMS_TEMP_TOPIC_ADDRESS_PREFIX.length());
+
+ return new HornetQTemporaryTopic(address, name, null);
+ }
else
{
throw new IllegalArgumentException("Invalid address " + address);
@@ -158,14 +174,14 @@
{
String name = UUID.randomUUID().toString();
- return new HornetQTemporaryQueue(JMS_QUEUE_ADDRESS_PREFIX.concat(name), name,
session);
+ return new HornetQTemporaryQueue(JMS_TEMP_QUEUE_ADDRESS_PREFIX.concat(name), name,
session);
}
public static HornetQTemporaryTopic createTemporaryTopic(final HornetQSession
session)
{
String name = UUID.randomUUID().toString();
- return new HornetQTemporaryTopic(JMS_TOPIC_ADDRESS_PREFIX.concat(name), name,
session);
+ return new HornetQTemporaryTopic(JMS_TEMP_TOPIC_ADDRESS_PREFIX.concat(name), name,
session);
}