Repository: activemq-artemis Updated Branches: refs/heads/master 930df932b -> a394c831f
Changed core protocol handshake to use ARTEMIS Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f07af676 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f07af676 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f07af676 Branch: refs/heads/master Commit: f07af67632da6fb02cf8bb15e4d81749860129b1 Parents: 930df93 Author: Martyn Taylor <[email protected]> Authored: Thu May 7 12:16:58 2015 +0100 Committer: Martyn Taylor <[email protected]> Committed: Thu May 7 14:46:48 2015 +0100 ---------------------------------------------------------------------- .../core/impl/ActiveMQClientProtocolManager.java | 3 ++- .../core/protocol/core/impl/CoreProtocolManager.java | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f07af676/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java index 0a5dcca..aa75d75 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java @@ -74,6 +74,8 @@ import org.apache.activemq.artemis.utils.VersionLoader; public class ActiveMQClientProtocolManager implements ClientProtocolManager { + private static final String handshake = "ARTEMIS"; + private final int versionID = VersionLoader.getVersion().getIncrementingVersion(); private ClientSessionFactoryInternal factoryInternal; @@ -479,7 +481,6 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager if (transportConnection.isUsingProtocolHandling()) { // no need to send handshake on inVM as inVM is not using the NettyProtocolHandling - String handshake = "HORNETQ"; ActiveMQBuffer amqbuffer = connection.createTransportBuffer(handshake.length()); amqbuffer.writeBytes(handshake.getBytes()); transportConnection.write(amqbuffer); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f07af676/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManager.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManager.java index 8696946..f56e017 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManager.java @@ -185,13 +185,13 @@ class CoreProtocolManager implements ProtocolManager<Interceptor> public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer) { //if we are not an old client then handshake - if (buffer.getByte(0) == 'H' && - buffer.getByte(1) == 'O' && - buffer.getByte(2) == 'R' && - buffer.getByte(3) == 'N' && - buffer.getByte(4) == 'E' && - buffer.getByte(5) == 'T' && - buffer.getByte(6) == 'Q') + if (buffer.getByte(0) == 'A' && + buffer.getByte(1) == 'R' && + buffer.getByte(2) == 'T' && + buffer.getByte(3) == 'E' && + buffer.getByte(4) == 'M' && + buffer.getByte(5) == 'I' && + buffer.getByte(6) == 'S') { //todo add some handshaking buffer.readBytes(7);
