summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2009-05-28 16:38:03 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2009-05-28 16:38:03 +0000
commit702a545f363eadb83b22734712fe1fb56055c6d6 (patch)
tree3fb9737bdc85f9d47b64f7d09244eb3333425c17 /qpid/java
parent91a878bfb1b673d0a4e74cc17d03e3384c521d00 (diff)
downloadqpid-python-702a545f363eadb83b22734712fe1fb56055c6d6.tar.gz
This is related to QPID-1875
The BindingURLParser is updated to grab the clientID and subscription to form the queue name. I also added a test case to cover this. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@779651 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java12
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java2
2 files changed, 13 insertions, 1 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
index 2a66b86985..22e432a44f 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
@@ -177,6 +177,18 @@ public class DestinationURLTest extends TestCase
assertTrue("Failed to throw an URISyntaxException when both the bindingkey and routingkey is specified",exceptionThrown);
}
+
+ public void testDestinationWithDurableTopic() throws URISyntaxException
+ {
+
+ String url = "topic://amq.topic//testTopicD?durable='true'&autodelete='true'&clientid='test'&subscription='testQueueD'";
+
+ AMQBindingURL dest = new AMQBindingURL(url);
+
+ assertTrue(dest.getExchangeClass().equals("topic"));
+ assertTrue(dest.getExchangeName().equals("amq.topic"));
+ assertTrue(dest.getQueueName().equals("test:testQueueD"));
+ }
public static junit.framework.Test suite()
{
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java b/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java
index f73ae9c232..7fe7d2e1da 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java
@@ -417,7 +417,7 @@ public class BindingURLParser
{
if (_bindingURL.containsOption(BindingURL.OPTION_CLIENTID) && _bindingURL.containsOption(BindingURL.OPTION_SUBSCRIPTION))
{
- queueName = _bindingURL.getOption(BindingURL.OPTION_CLIENTID + ":" + BindingURL.OPTION_SUBSCRIPTION);
+ queueName = _bindingURL.getOption(BindingURL.OPTION_CLIENTID) + ":" + _bindingURL.getOption(BindingURL.OPTION_SUBSCRIPTION);
}
else
{