activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [2/2] activemq-artemis git commit: ARTEMIS-392 Fixing Allocator after socket upgrade
Date Mon, 08 Feb 2016 16:40:00 GMT
ARTEMIS-392 Fixing Allocator after socket upgrade

https://issues.apache.org/jira/browse/ARTEMIS-392


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

Branch: refs/heads/master
Commit: e9ce4ce40beed4bf974f8542ee86222c4e06ade5
Parents: 8d275de
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Fri Feb 5 16:42:34 2016 -0500
Committer: jbertram <jbertram@apache.org>
Committed: Mon Feb 8 10:34:16 2016 -0600

----------------------------------------------------------------------
 .../apache/activemq/artemis/core/protocol/ProtocolHandler.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e9ce4ce4/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
index 08fc044..8f965ce 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
@@ -43,6 +43,7 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.HttpKeepAliveRunnabl
 import org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptor;
 import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector;
 import org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection;
+import org.apache.activemq.artemis.core.remoting.impl.netty.PartialPooledByteBufAllocator;
 import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.core.server.protocol.stomp.WebSocketServerHandler;
 import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
@@ -172,6 +173,11 @@ public class ProtocolHandler {
          NettyServerConnection connection = channelHandler.createConnection(ctx, protocolToUse,
httpEnabled);
          protocolManagerToUse.handshake(connection, new ChannelBufferWrapper(in));
          pipeline.remove(this);
+
+         // https://issues.apache.org/jira/browse/ARTEMIS-392
+         // Application servers or other components may upgrade a regular socket to Netty
+         // We need to be able to work normally as with anything else on Artemis
+         ctx.channel().config().setAllocator(PartialPooledByteBufAllocator.INSTANCE);
          ctx.flush();
       }
 


Mime
View raw message