From b29d2ea34275ce5cb4d2653ff1edda9dad454763 Mon Sep 17 00:00:00 2001 From: Timothy Bish Date: Tue, 8 May 2018 17:44:55 -0400 Subject: [PATCH] AMQ-6909 Update Qpid JMS, proton-j and Netty to latest. Use latest releases of AMQP deps --- .../transport/amqp/message/AmqpWritableBuffer.java | 10 +++++++--- .../transport/amqp/protocol/AmqpConnection.java | 6 ++++++ pom.xml | 10 +++++----- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/message/AmqpWritableBuffer.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/message/AmqpWritableBuffer.java index 399eb3fa9a..ba6a773158 100644 --- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/message/AmqpWritableBuffer.java +++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/message/AmqpWritableBuffer.java @@ -18,11 +18,9 @@ package org.apache.activemq.transport.amqp.message; import java.nio.ByteBuffer; +import org.apache.qpid.proton.codec.ReadableBuffer; import org.apache.qpid.proton.codec.WritableBuffer; -/** - * - */ public class AmqpWritableBuffer implements WritableBuffer { public final static int DEFAULT_CAPACITY = 4 * 1024; @@ -148,6 +146,12 @@ public class AmqpWritableBuffer implements WritableBuffer { return Integer.MAX_VALUE; } + @Override + public void put(ReadableBuffer src) { + ensureCapacity(position); + src.get(this); + } + /** * Ensures the the buffer has at least the minimumCapacity specified. * diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java index dec1bc9b3c..39f7bff398 100644 --- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java +++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java @@ -171,6 +171,11 @@ public class AmqpConnection implements AmqpProtocolConverter { int maxFrameSize = amqpWireFormat.getMaxAmqpFrameSize(); if (maxFrameSize > AmqpWireFormat.NO_AMQP_MAX_FRAME_SIZE) { this.protonTransport.setMaxFrameSize(maxFrameSize); + try { + this.protonTransport.setOutboundFrameSizeLimit(maxFrameSize); + } catch (Throwable e) { + // Ignore if older proton-j was injected. + } } this.protonTransport.bind(this.protonConnection); @@ -328,6 +333,7 @@ public class AmqpConnection implements AmqpProtocolConverter { } } + @SuppressWarnings("deprecation") @Override public void onAMQPData(Object command) throws Exception { Buffer frame; diff --git a/pom.xml b/pom.xml index 30d3fd500c..d7991ce8a3 100644 --- a/pom.xml +++ b/pom.xml @@ -103,11 +103,11 @@ 1.1.2 1.4.0 3.4.6 - 0.26.0 - 0.30.0 - 4.1.22.Final - 0.26.0 - 4.1.22.Final + 0.27.1 + 0.32.0 + 4.1.24.Final + 0.27.1 + 4.1.24.Final 1.3 1.0 9.5.1-5