You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2014/12/22 17:39:55 UTC

[7/7] qpid-jms git commit: update ConnectionFactory defaults to ensure no local prefix values

update ConnectionFactory defaults to ensure no local prefix values


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/04d7f274
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/04d7f274
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/04d7f274

Branch: refs/heads/master
Commit: 04d7f274c45a962314e2ea5d683f8c7ce3b852df
Parents: 5ef833a
Author: Robert Gemmell <ro...@apache.org>
Authored: Mon Dec 22 16:24:11 2014 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Mon Dec 22 16:24:11 2014 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/qpid/jms/JmsConnectionFactory.java  | 4 ++--
 .../apache/qpid/jms/integration/MessageIntegrationTest.java  | 6 +++---
 .../apache/qpid/jms/integration/SessionIntegrationTest.java  | 8 ++++----
 .../java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java | 4 +---
 4 files changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/04d7f274/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
index 293749f..5e02cd8 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
@@ -59,8 +59,8 @@ public class JmsConnectionFactory extends JNDIStorable implements ConnectionFact
     private boolean sendAcksAsync;
     private boolean omitHost;
     private boolean messagePrioritySupported = true;
-    private String queuePrefix = "queue://";
-    private String topicPrefix = "topic://";
+    private String queuePrefix = null;
+    private String topicPrefix = null;
     private long sendTimeout = JmsConnectionInfo.DEFAULT_SEND_TIMEOUT;
     private long requestTimeout = JmsConnectionInfo.DEFAULT_REQUEST_TIMEOUT;
     private long closeTimeout = JmsConnectionInfo.DEFAULT_CLOSE_TIMEOUT;

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/04d7f274/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java
index a36307b..f6cb671 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java
@@ -125,7 +125,7 @@ public class MessageIntegrationTest extends QpidJmsTestCase
 
             MessageAnnotationsSectionMatcher msgAnnotationsMatcher = new MessageAnnotationsSectionMatcher(true);
 
-            MessagePropertiesSectionMatcher propsMatcher = new MessagePropertiesSectionMatcher(true).withTo(equalTo("queue://" + queueName));
+            MessagePropertiesSectionMatcher propsMatcher = new MessagePropertiesSectionMatcher(true).withTo(equalTo(queueName));
 
             TransferPayloadCompositeMatcher messageMatcher = new TransferPayloadCompositeMatcher();
             messageMatcher.setHeadersMatcher(headersMatcher);
@@ -898,7 +898,7 @@ public class MessageIntegrationTest extends QpidJmsTestCase
             Symbol annotationKey = AmqpMessageSupport.getSymbol(AmqpDestinationHelper.JMS_DEST_TYPE_MSG_ANNOTATION_SYMBOL_NAME);
             msgAnnotationsMatcher.withEntry(annotationKey, equalTo(AmqpDestinationHelper.TOPIC_TYPE));
 
-            MessagePropertiesSectionMatcher propsMatcher = new MessagePropertiesSectionMatcher(true).withTo(equalTo("topic://" + topicName));
+            MessagePropertiesSectionMatcher propsMatcher = new MessagePropertiesSectionMatcher(true).withTo(equalTo(topicName));
 
             TransferPayloadCompositeMatcher messageMatcher = new TransferPayloadCompositeMatcher();
             messageMatcher.setHeadersMatcher(headersMatcher);
@@ -937,7 +937,7 @@ public class MessageIntegrationTest extends QpidJmsTestCase
             Symbol annotationKey = AmqpMessageSupport.getSymbol(AmqpDestinationHelper.JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME);
             msgAnnotationsMatcher.withEntry(annotationKey, equalTo(AmqpDestinationHelper.TOPIC_TYPE));
 
-            MessagePropertiesSectionMatcher propsMatcher = new MessagePropertiesSectionMatcher(true).withReplyTo(equalTo("topic://" + replyTopicName));
+            MessagePropertiesSectionMatcher propsMatcher = new MessagePropertiesSectionMatcher(true).withReplyTo(equalTo(replyTopicName));
 
             TransferPayloadCompositeMatcher messageMatcher = new TransferPayloadCompositeMatcher();
             messageMatcher.setHeadersMatcher(headersMatcher);

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/04d7f274/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java
index 21e8285..12908c7 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java
@@ -119,7 +119,7 @@ public class SessionIntegrationTest extends QpidJmsTestCase {
             //sourceMatcher.withDefaultOutcome(outcomeMatcher);
 
             TargetMatcher targetMatcher = new TargetMatcher();
-            targetMatcher.withAddress(equalTo("queue://" + queueName));
+            targetMatcher.withAddress(equalTo(queueName));
 
             testPeer.expectSenderAttach(sourceMatcher, targetMatcher, false, false);
 
@@ -332,7 +332,7 @@ public class SessionIntegrationTest extends QpidJmsTestCase {
 
             //Expect a link to a topic node, which we will then refuse
             TargetMatcher targetMatcher = new TargetMatcher();
-            targetMatcher.withAddress(equalTo("topic://" + topicName)); //TODO: remove prefix
+            targetMatcher.withAddress(equalTo(topicName));
             targetMatcher.withDynamic(nullValue());//default = false
             targetMatcher.withDurable(nullValue());//default = none/0
 
@@ -377,7 +377,7 @@ public class SessionIntegrationTest extends QpidJmsTestCase {
             //Expect a new message sent by the above producer to cause creation of a new
             //sender link to the given destination, then closing the link after the message is sent.
             TargetMatcher targetMatcher = new TargetMatcher();
-            targetMatcher.withAddress(equalTo("topic://" + topicName)); //TODO: remove prefix
+            targetMatcher.withAddress(equalTo(topicName));
             targetMatcher.withDynamic(nullValue());//default = false
             targetMatcher.withDurable(nullValue());//default = none/0
 
@@ -698,7 +698,7 @@ public class SessionIntegrationTest extends QpidJmsTestCase {
             Queue queue = session.createQueue(queueName);
 
             SourceMatcher sourceMatcher = new SourceMatcher();
-            sourceMatcher.withAddress(equalTo("queue://" + queueName));
+            sourceMatcher.withAddress(equalTo(queueName));
             sourceMatcher.withDynamic(equalTo(false));
             sourceMatcher.withOutcomes(arrayContaining(Accepted.DESCRIPTOR_SYMBOL, Rejected.DESCRIPTOR_SYMBOL, Released.DESCRIPTOR_SYMBOL, Modified.DESCRIPTOR_SYMBOL));
             ModifiedMatcher outcomeMatcher = new ModifiedMatcher().withDeliveryFailed(equalTo(true)).withUndeliverableHere(equalTo(false));

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/04d7f274/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
index 3cf94aa..162b204 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
@@ -646,10 +646,8 @@ public class TestAmqpPeer implements AutoCloseable
 
     public void expectDurableSubscriberAttach(String topicName, String subscriptionName)
     {
-        String topicPrefix = "topic://"; //TODO: this will be removed, delete when tests start failing
-
         SourceMatcher sourceMatcher = new SourceMatcher();
-        sourceMatcher.withAddress(equalTo(topicPrefix + topicName));
+        sourceMatcher.withAddress(equalTo(topicName));
         sourceMatcher.withDynamic(equalTo(false));
         //TODO: will possibly be changed to a 1/config durability
         sourceMatcher.withDurable(equalTo(TerminusDurability.UNSETTLED_STATE));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org