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 2017/09/29 11:30:07 UTC

[1/3] qpid-jms git commit: QPIDJMS-331: have the connection desire the SHARED_SUBS capability

Repository: qpid-jms
Updated Branches:
  refs/heads/master f4fcfab89 -> a6db6a001


QPIDJMS-331: have the connection desire the SHARED_SUBS capability


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

Branch: refs/heads/master
Commit: a6db6a001a094d4ff9505320f8827b2a69beb5bb
Parents: ac5aab2
Author: Robbie Gemmell <ro...@apache.org>
Authored: Fri Sep 29 12:20:27 2017 +0100
Committer: Robbie Gemmell <ro...@apache.org>
Committed: Fri Sep 29 12:21:39 2017 +0100

----------------------------------------------------------------------
 .../qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java  | 5 +++--
 .../java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java    | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6db6a00/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
index 5eebadb..def9c0c 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
@@ -17,8 +17,9 @@
 package org.apache.qpid.jms.provider.amqp.builders;
 
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.ANONYMOUS_RELAY;
-import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SOLE_CONNECTION_CAPABILITY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.DELAYED_DELIVERY;
+import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SHARED_SUBS;
+import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SOLE_CONNECTION_CAPABILITY;
 
 import java.net.URI;
 import java.util.ArrayList;
@@ -118,7 +119,7 @@ public class AmqpConnectionBuilder extends AmqpResourceBuilder<AmqpConnection, A
         Connection connection = getParent().getProtonConnection();
         connection.setHostname(hostname);
         connection.setContainer(resourceInfo.getClientId());
-        connection.setDesiredCapabilities(new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY, ANONYMOUS_RELAY});
+        connection.setDesiredCapabilities(new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY, ANONYMOUS_RELAY, SHARED_SUBS});
         connection.setProperties(props);
 
         return connection;

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6db6a00/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 64cb2c6..89c78d9 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
@@ -23,6 +23,7 @@ import static org.apache.qpid.jms.provider.amqp.AmqpSupport.DELAYED_DELIVERY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.DYNAMIC_NODE_LIFETIME_POLICY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.GLOBAL;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SHARED;
+import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SHARED_SUBS;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SOLE_CONNECTION_CAPABILITY;
 
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -143,7 +144,7 @@ public class TestAmqpPeer implements AutoCloseable
     private static final UnsignedByte SASL_FAIL_AUTH = UnsignedByte.valueOf((byte)1);
     private static final int CONNECTION_CHANNEL = 0;
     private static final int DEFAULT_PRODUCER_CREDIT = 100;
-    private static final Symbol[] DEFAULT_DESIRED_CAPABILITIES = new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY, ANONYMOUS_RELAY};
+    private static final Symbol[] DEFAULT_DESIRED_CAPABILITIES = new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY, ANONYMOUS_RELAY, SHARED_SUBS};
 
     private volatile AssertionError _firstAssertionError = null;
     private final TestAmqpPeerRunner _driverRunnable;


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


[2/3] qpid-jms git commit: QPIDJMS-330: have the connection desire the ANONYMOUS-RELAY capability

Posted by ro...@apache.org.
QPIDJMS-330: have the connection desire the ANONYMOUS-RELAY capability


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

Branch: refs/heads/master
Commit: ac5aab2cb0db996f7726ca6be7a5b74d7adb09b1
Parents: 2f3c13c
Author: Robbie Gemmell <ro...@apache.org>
Authored: Fri Sep 29 12:19:49 2017 +0100
Committer: Robbie Gemmell <ro...@apache.org>
Committed: Fri Sep 29 12:21:39 2017 +0100

----------------------------------------------------------------------
 .../qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java    | 3 ++-
 .../test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/ac5aab2c/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
index 6ff7a6d..5eebadb 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
@@ -16,6 +16,7 @@
  */
 package org.apache.qpid.jms.provider.amqp.builders;
 
+import static org.apache.qpid.jms.provider.amqp.AmqpSupport.ANONYMOUS_RELAY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SOLE_CONNECTION_CAPABILITY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.DELAYED_DELIVERY;
 
@@ -117,7 +118,7 @@ public class AmqpConnectionBuilder extends AmqpResourceBuilder<AmqpConnection, A
         Connection connection = getParent().getProtonConnection();
         connection.setHostname(hostname);
         connection.setContainer(resourceInfo.getClientId());
-        connection.setDesiredCapabilities(new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY });
+        connection.setDesiredCapabilities(new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY, ANONYMOUS_RELAY});
         connection.setProperties(props);
 
         return connection;

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/ac5aab2c/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 5081667..64cb2c6 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
@@ -18,6 +18,7 @@
  */
 package org.apache.qpid.jms.test.testpeer;
 
+import static org.apache.qpid.jms.provider.amqp.AmqpSupport.ANONYMOUS_RELAY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.DELAYED_DELIVERY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.DYNAMIC_NODE_LIFETIME_POLICY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.GLOBAL;
@@ -142,7 +143,7 @@ public class TestAmqpPeer implements AutoCloseable
     private static final UnsignedByte SASL_FAIL_AUTH = UnsignedByte.valueOf((byte)1);
     private static final int CONNECTION_CHANNEL = 0;
     private static final int DEFAULT_PRODUCER_CREDIT = 100;
-    private static final Symbol[] DEFAULT_DESIRED_CAPABILITIES = new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY};
+    private static final Symbol[] DEFAULT_DESIRED_CAPABILITIES = new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY, ANONYMOUS_RELAY};
 
     private volatile AssertionError _firstAssertionError = null;
     private final TestAmqpPeerRunner _driverRunnable;


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


[3/3] qpid-jms git commit: QPIDJMS-326: have the connection desire the DELAYED_DELIVERY capability

Posted by ro...@apache.org.
QPIDJMS-326: have the connection desire the DELAYED_DELIVERY capability


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

Branch: refs/heads/master
Commit: 2f3c13c4f011dcbfe6f2a86b7853758582707b71
Parents: f4fcfab
Author: Robbie Gemmell <ro...@apache.org>
Authored: Fri Sep 29 12:19:00 2017 +0100
Committer: Robbie Gemmell <ro...@apache.org>
Committed: Fri Sep 29 12:21:39 2017 +0100

----------------------------------------------------------------------
 .../amqp/builders/AmqpConnectionBuilder.java        |  3 ++-
 .../jms/integration/IntegrationTestFixture.java     |  9 ++-------
 .../integration/SubscriptionsIntegrationTest.java   |  2 +-
 .../apache/qpid/jms/test/testpeer/TestAmqpPeer.java | 16 ++++++++++------
 4 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/2f3c13c4/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
index 98cabfc..6ff7a6d 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConnectionBuilder.java
@@ -17,6 +17,7 @@
 package org.apache.qpid.jms.provider.amqp.builders;
 
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SOLE_CONNECTION_CAPABILITY;
+import static org.apache.qpid.jms.provider.amqp.AmqpSupport.DELAYED_DELIVERY;
 
 import java.net.URI;
 import java.util.ArrayList;
@@ -116,7 +117,7 @@ public class AmqpConnectionBuilder extends AmqpResourceBuilder<AmqpConnection, A
         Connection connection = getParent().getProtonConnection();
         connection.setHostname(hostname);
         connection.setContainer(resourceInfo.getClientId());
-        connection.setDesiredCapabilities(new Symbol[] { SOLE_CONNECTION_CAPABILITY });
+        connection.setDesiredCapabilities(new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY });
         connection.setProperties(props);
 
         return connection;

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/2f3c13c4/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/IntegrationTestFixture.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/IntegrationTestFixture.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/IntegrationTestFixture.java
index acb386f..03cdf6e 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/IntegrationTestFixture.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/IntegrationTestFixture.java
@@ -28,7 +28,6 @@ import javax.jms.JMSContext;
 import javax.jms.JMSException;
 
 import org.apache.qpid.jms.JmsConnectionFactory;
-import org.apache.qpid.jms.provider.amqp.AmqpSupport;
 import org.apache.qpid.jms.test.testpeer.TestAmqpPeer;
 import org.apache.qpid.proton.amqp.Symbol;
 
@@ -59,10 +58,8 @@ public class IntegrationTestFixture {
     }
 
     Connection establishConnecton(TestAmqpPeer testPeer, boolean ssl, String optionsString, Symbol[] serverCapabilities, Map<Symbol, Object> serverProperties, boolean setClientId) throws JMSException {
-        Symbol[] desiredCapabilities = new Symbol[] { AmqpSupport.SOLE_CONNECTION_CAPABILITY };
-
         testPeer.expectSaslPlain("guest", "guest");
-        testPeer.expectOpen(desiredCapabilities, serverCapabilities, serverProperties);
+        testPeer.expectOpen(serverProperties, serverCapabilities);
 
         // Each connection creates a session for managing temporary destinations etc
         testPeer.expectBegin();
@@ -111,10 +108,8 @@ public class IntegrationTestFixture {
     }
 
     JMSContext createJMSContext(TestAmqpPeer testPeer, boolean ssl, String optionsString, Symbol[] serverCapabilities, Map<Symbol, Object> serverProperties, boolean setClientId, int sessionMode) throws JMSException {
-        Symbol[] desiredCapabilities = new Symbol[] { AmqpSupport.SOLE_CONNECTION_CAPABILITY };
-
         testPeer.expectSaslPlain("guest", "guest");
-        testPeer.expectOpen(desiredCapabilities, serverCapabilities, serverProperties);
+        testPeer.expectOpen(serverProperties, serverCapabilities);
 
         // Each connection creates a session for managing temporary destinations etc
         testPeer.expectBegin();

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/2f3c13c4/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SubscriptionsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SubscriptionsIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SubscriptionsIntegrationTest.java
index e9739ed..5bd59e9 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SubscriptionsIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SubscriptionsIntegrationTest.java
@@ -1604,7 +1604,7 @@ public class SubscriptionsIntegrationTest extends QpidJmsTestCase {
             Symbol[] serverCapabilities = new Symbol[]{SHARED_SUBS};
 
             testPeer.expectSaslAnonymous();
-            testPeer.expectOpen(new Symbol[] { AmqpSupport.SOLE_CONNECTION_CAPABILITY }, serverCapabilities, null);
+            testPeer.expectOpen(null, serverCapabilities);
             testPeer.expectBegin();
 
             ConnectionFactory factory = new JmsConnectionFactory("amqp://localhost:" + serverPort + "?jms.awaitClientID=false");

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/2f3c13c4/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 fcb9421..5081667 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
@@ -18,9 +18,12 @@
  */
 package org.apache.qpid.jms.test.testpeer;
 
+import static org.apache.qpid.jms.provider.amqp.AmqpSupport.DELAYED_DELIVERY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.DYNAMIC_NODE_LIFETIME_POLICY;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.GLOBAL;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SHARED;
+import static org.apache.qpid.jms.provider.amqp.AmqpSupport.SOLE_CONNECTION_CAPABILITY;
+
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.arrayContaining;
 import static org.hamcrest.Matchers.equalTo;
@@ -139,6 +142,7 @@ public class TestAmqpPeer implements AutoCloseable
     private static final UnsignedByte SASL_FAIL_AUTH = UnsignedByte.valueOf((byte)1);
     private static final int CONNECTION_CHANNEL = 0;
     private static final int DEFAULT_PRODUCER_CREDIT = 100;
+    private static final Symbol[] DEFAULT_DESIRED_CAPABILITIES = new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY};
 
     private volatile AssertionError _firstAssertionError = null;
     private final TestAmqpPeerRunner _driverRunnable;
@@ -809,7 +813,11 @@ public class TestAmqpPeer implements AutoCloseable
     }
 
     public void expectOpen(Map<Symbol, Object> serverProperties) {
-        expectOpen(new Symbol[] { AmqpSupport.SOLE_CONNECTION_CAPABILITY }, new Symbol[] { AmqpSupport.SOLE_CONNECTION_CAPABILITY }, null, serverProperties, null, null, false);
+        expectOpen(DEFAULT_DESIRED_CAPABILITIES, new Symbol[] { AmqpSupport.SOLE_CONNECTION_CAPABILITY }, null, serverProperties, null, null, false);
+    }
+
+    public void expectOpen(Map<Symbol, Object> serverProperties, Symbol[] serverCapabilities) {
+        expectOpen(DEFAULT_DESIRED_CAPABILITIES, serverCapabilities, null, serverProperties, null, null, false);
     }
 
     public void expectOpen(Matcher<?> clientPropertiesMatcher, Matcher<?> hostnameMatcher, boolean deferOpened) {
@@ -817,11 +825,7 @@ public class TestAmqpPeer implements AutoCloseable
     }
 
     public void expectOpen(Matcher<?> clientPropertiesMatcher, Matcher<?> idleTimeoutMatcher, Matcher<?> hostnameMatcher, boolean deferOpened) {
-        expectOpen(new Symbol[] { AmqpSupport.SOLE_CONNECTION_CAPABILITY }, new Symbol[] { AmqpSupport.SOLE_CONNECTION_CAPABILITY }, clientPropertiesMatcher, null, null, hostnameMatcher, deferOpened);
-    }
-
-    public void expectOpen(Symbol[] desiredCapabilities, Symbol[] serverCapabilities, Map<Symbol, Object> serverProperties) {
-        expectOpen(desiredCapabilities, serverCapabilities, null, serverProperties, null, null, false);
+        expectOpen(DEFAULT_DESIRED_CAPABILITIES, new Symbol[] { AmqpSupport.SOLE_CONNECTION_CAPABILITY }, clientPropertiesMatcher, null, null, hostnameMatcher, deferOpened);
     }
 
     public void sendPreemptiveServerOpenFrame() {


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