You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2017/05/18 17:28:13 UTC

[1/2] activemq-artemis git commit: ARTEMIS-1169 Fixing protocol conversion

Repository: activemq-artemis
Updated Branches:
  refs/heads/master a05e36ece -> f84d9f811


ARTEMIS-1169 Fixing protocol conversion

this will fix a few multiple protocol tests on ConsumerTests.
And a few other AMQP tests dealing with conversions.

You would get a classCastException without this commit.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/830c3bf1
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/830c3bf1
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/830c3bf1

Branch: refs/heads/master
Commit: 830c3bf1792fcf3c18e92ff3a6f4676c89ea8f29
Parents: a05e36e
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu May 18 12:01:23 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu May 18 13:25:15 2017 -0400

----------------------------------------------------------------------
 .../artemis/protocol/amqp/broker/AMQPSessionCallback.java    | 3 +--
 .../protocol/amqp/proton/ProtonServerSenderContext.java      | 8 ++++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/830c3bf1/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
index 4b26d79..0add7b7 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
@@ -567,8 +567,7 @@ public class AMQPSessionCallback implements SessionCallback {
       ProtonServerSenderContext plugSender = (ProtonServerSenderContext) consumer.getProtocolContext();
 
       try {
-         invokeOutgoing((AMQPMessage) message, (ActiveMQProtonRemotingConnection) transportConnection.getProtocolConnection());
-         return plugSender.deliverMessage(ref, deliveryCount);
+         return plugSender.deliverMessage(ref, deliveryCount, transportConnection);
       } catch (Exception e) {
          connection.lock();
          try {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/830c3bf1/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
index f2f94d5..6dcf41a 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
@@ -36,6 +36,7 @@ import org.apache.activemq.artemis.core.server.MessageReference;
 import org.apache.activemq.artemis.core.server.QueueQueryResult;
 import org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage;
 import org.apache.activemq.artemis.protocol.amqp.broker.AMQPSessionCallback;
+import org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection;
 import org.apache.activemq.artemis.protocol.amqp.converter.CoreAmqpConverter;
 import org.apache.activemq.artemis.protocol.amqp.exceptions.ActiveMQAMQPException;
 import org.apache.activemq.artemis.protocol.amqp.exceptions.ActiveMQAMQPIllegalStateException;
@@ -47,6 +48,7 @@ import org.apache.activemq.artemis.protocol.amqp.proton.transaction.ProtonTransa
 import org.apache.activemq.artemis.reader.MessageUtil;
 import org.apache.activemq.artemis.selector.filter.FilterException;
 import org.apache.activemq.artemis.selector.impl.SelectorParser;
+import org.apache.activemq.artemis.spi.core.remoting.Connection;
 import org.apache.activemq.artemis.utils.CompositeAddress;
 import org.apache.qpid.proton.amqp.DescribedType;
 import org.apache.qpid.proton.amqp.Symbol;
@@ -657,13 +659,15 @@ public class ProtonServerSenderContext extends ProtonInitializable implements Pr
    /**
     * handle an out going message from ActiveMQ Artemis, send via the Proton Sender
     */
-   public int deliverMessage(MessageReference messageReference, int deliveryCount) throws Exception {
-      AMQPMessage message = CoreAmqpConverter.checkAMQP(messageReference.getMessage());
+   public int deliverMessage(MessageReference messageReference, int deliveryCount, Connection transportConnection) throws Exception {
 
       if (closed) {
          return 0;
       }
 
+      AMQPMessage message = CoreAmqpConverter.checkAMQP(messageReference.getMessage());
+      sessionSPI.invokeOutgoing(message, (ActiveMQProtonRemotingConnection) transportConnection.getProtocolConnection());
+
       // presettle means we can settle the message on the dealer side before we send it, i.e.
       // for browsers
       boolean preSettle = sender.getRemoteSenderSettleMode() == SenderSettleMode.SETTLED;


[2/2] activemq-artemis git commit: This closes #1283

Posted by cl...@apache.org.
This closes #1283


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f84d9f81
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f84d9f81
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f84d9f81

Branch: refs/heads/master
Commit: f84d9f811c0765d12113c82f545a92721e5ec2e0
Parents: a05e36e 830c3bf
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu May 18 13:28:07 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu May 18 13:28:07 2017 -0400

----------------------------------------------------------------------
 .../artemis/protocol/amqp/broker/AMQPSessionCallback.java    | 3 +--
 .../protocol/amqp/proton/ProtonServerSenderContext.java      | 8 ++++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------