qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject svn commit: r779651 - in /qpid/trunk/qpid/java: client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java common/src/main/java/org/apache/qpid/url/BindingURLParser.java
Date Thu, 28 May 2009 16:38:04 GMT
Author: rajith
Date: Thu May 28 16:38:03 2009
New Revision: 779651

URL: http://svn.apache.org/viewvc?rev=779651&view=rev
Log:
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.

Modified:
    qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
    qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java

Modified: qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java?rev=779651&r1=779650&r2=779651&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
(original)
+++ qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
Thu May 28 16:38:03 2009
@@ -177,6 +177,18 @@
 
         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()
     {

Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java?rev=779651&r1=779650&r2=779651&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java (original)
+++ qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java Thu
May 28 16:38:03 2009
@@ -417,7 +417,7 @@
             {
                 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
                 {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message