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 2016/10/10 21:25:34 UTC
[2/2] activemq-artemis git commit: ARTEMIS-779 upgrade to netty
4.1.5.Final
ARTEMIS-779 upgrade to netty 4.1.5.Final
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fcb70f3f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fcb70f3f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fcb70f3f
Branch: refs/heads/master
Commit: fcb70f3f60fd4c3eaf8b2fe3fdf11f0b82d91655
Parents: c684e9c
Author: Paul Gallagher <pg...@redhat.com>
Authored: Mon Oct 10 12:35:25 2016 +0100
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Oct 10 23:24:56 2016 +0200
----------------------------------------------------------------------
.../netty/PartialPooledByteBufAllocator.java | 5 +++++
artemis-distribution/pom.xml | 2 +-
artemis-distribution/src/main/assembly/dep.xml | 1 -
artemis-protocols/artemis-mqtt-protocol/pom.xml | 19 +------------------
.../core/protocol/mqtt/MQTTProtocolHandler.java | 2 +-
.../core/protocol/mqtt/MQTTProtocolManager.java | 2 +-
pom.xml | 9 +--------
tests/integration-tests/pom.xml | 2 +-
8 files changed, 11 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcb70f3f/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/PartialPooledByteBufAllocator.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/PartialPooledByteBufAllocator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/PartialPooledByteBufAllocator.java
index aeede30..d6b9251 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/PartialPooledByteBufAllocator.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/PartialPooledByteBufAllocator.java
@@ -130,4 +130,9 @@ public class PartialPooledByteBufAllocator implements ByteBufAllocator {
public boolean isDirectBufferPooled() {
return true;
}
+
+ @Override
+ public int calculateNewCapacity(int minNewCapacity, int maxCapacity) {
+ return UNPOOLED.calculateNewCapacity(minNewCapacity, maxCapacity);
+ }
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcb70f3f/artemis-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/artemis-distribution/pom.xml b/artemis-distribution/pom.xml
index 36c219e..46203e8 100644
--- a/artemis-distribution/pom.xml
+++ b/artemis-distribution/pom.xml
@@ -186,7 +186,7 @@
</dependency>
<dependency>
<groupId>io.netty</groupId>
- <artifactId>netty-codec-mqtt</artifactId>
+ <artifactId>netty-all</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcb70f3f/artemis-distribution/src/main/assembly/dep.xml
----------------------------------------------------------------------
diff --git a/artemis-distribution/src/main/assembly/dep.xml b/artemis-distribution/src/main/assembly/dep.xml
index a50fe79..d21f1e0 100644
--- a/artemis-distribution/src/main/assembly/dep.xml
+++ b/artemis-distribution/src/main/assembly/dep.xml
@@ -91,7 +91,6 @@
<include>commons-collections:commons-collections</include>
<include>org.fusesource.hawtbuf:hawtbuf</include>
<include>org.jgroups:jgroups</include>
- <include>io.netty:netty-codec-mqtt</include>
<include>org.apache.geronimo.specs:geronimo-json_1.0_spec</include>
<include>org.apache.johnzon:johnzon-core</include>
</includes>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcb70f3f/artemis-protocols/artemis-mqtt-protocol/pom.xml
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/pom.xml b/artemis-protocols/artemis-mqtt-protocol/pom.xml
index 2260d51..2349e16 100644
--- a/artemis-protocols/artemis-mqtt-protocol/pom.xml
+++ b/artemis-protocols/artemis-mqtt-protocol/pom.xml
@@ -47,7 +47,7 @@
</dependency>
<dependency>
<groupId>io.netty</groupId>
- <artifactId>netty-codec-mqtt</artifactId>
+ <artifactId>netty-all</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -55,21 +55,4 @@
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>3.0.0</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Embed-Dependency>netty-codec-mqtt</Embed-Dependency>
- <Export-Package>!*</Export-Package>
- <Import-Package>io.netty.*;version="[4,6)", *</Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcb70f3f/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
index 5d73f57..80923e9 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
@@ -169,7 +169,7 @@ public class MQTTProtocolHandler extends ChannelInboundHandlerAdapter {
void sendConnack(MqttConnectReturnCode returnCode) {
MqttFixedHeader fixedHeader = new MqttFixedHeader(MqttMessageType.CONNACK, false, MqttQoS.AT_MOST_ONCE, false, 0);
- MqttConnAckVariableHeader varHeader = new MqttConnAckVariableHeader(returnCode);
+ MqttConnAckVariableHeader varHeader = new MqttConnAckVariableHeader(returnCode, true);
MqttConnAckMessage message = new MqttConnAckMessage(fixedHeader, varHeader);
ctx.write(message);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcb70f3f/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManager.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManager.java
index f8bdf2a..1f435ff 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManager.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManager.java
@@ -110,7 +110,7 @@ class MQTTProtocolManager extends AbstractProtocolManager<MqttMessage, MQTTInter
@Override
public void addChannelHandlers(ChannelPipeline pipeline) {
- pipeline.addLast(new MqttEncoder());
+ pipeline.addLast(MqttEncoder.INSTANCE);
pipeline.addLast(new MqttDecoder(MQTTUtil.MAX_MESSAGE_SIZE));
pipeline.addLast(new MQTTProtocolHandler(server, this));
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcb70f3f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 319132e..5a05c4f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,7 +81,7 @@
<jetty.version>9.4.0.M1</jetty.version>
<jgroups.version>3.6.9.Final</jgroups.version>
<maven.assembly.plugin.version>2.4</maven.assembly.plugin.version>
- <netty.version>4.0.41.Final</netty.version>
+ <netty.version>4.1.5.Final</netty.version>
<proton.version>0.14.0</proton.version>
<resteasy.version>3.0.19.Final</resteasy.version>
<slf4j.version>1.7.21</slf4j.version>
@@ -92,7 +92,6 @@
<hawtbuff.version>1.11</hawtbuff.version>
<jb.logmanager.version>2.0.3.Final</jb.logmanager.version>
<airlift.version>0.7</airlift.version>
- <netty.codec.mqtt.version>5.0.0.Alpha2</netty.codec.mqtt.version>
<geronimo.annotation.1.1.spec.version>1.0.1</geronimo.annotation.1.1.spec.version>
<geronimo.ejb.3.0.spec.version>1.0.1</geronimo.ejb.3.0.spec.version>
<geronimo.jta.1.1.spec.version>1.1.1</geronimo.jta.1.1.spec.version>
@@ -437,12 +436,6 @@
<!-- License: Apache 2.0 -->
</dependency>
<dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-codec-mqtt</artifactId>
- <version>${netty.codec.mqtt.version}</version>
- <!-- License: Apache 2.0 -->
- </dependency>
- <dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>proton-j</artifactId>
<version>${proton.version}</version>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcb70f3f/tests/integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/pom.xml b/tests/integration-tests/pom.xml
index ced7814..9ba87dc 100644
--- a/tests/integration-tests/pom.xml
+++ b/tests/integration-tests/pom.xml
@@ -179,7 +179,7 @@
</dependency>
<dependency>
<groupId>io.netty</groupId>
- <artifactId>netty-codec-mqtt</artifactId>
+ <artifactId>netty-all</artifactId>
</dependency>
<!-- END MQTT Deps -->