From dcf0210605c2b30128c493550e1316b9ec765b41 Mon Sep 17 00:00:00 2001 From: Tomas Hofman Date: Thu, 1 Jun 2017 16:35:43 +0200 Subject: [PATCH] ARTEMIS-1187 Incompatible version when recreating a session with older server https://issues.jboss.org/browse/JBEAP-9522 (cherry picked from commit c3871a183f48b6cccaa3a65e7c14b2b64e16b39d) --- .../core/protocol/core/impl/ActiveMQSessionContext.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java index d35525300d..b74f9888c2 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java @@ -104,7 +104,6 @@ import org.apache.activemq.artemis.spi.core.remoting.Connection; import org.apache.activemq.artemis.spi.core.remoting.ReadyListener; import org.apache.activemq.artemis.spi.core.remoting.SessionContext; import org.apache.activemq.artemis.utils.TokenBucketLimiterImpl; -import org.apache.activemq.artemis.utils.VersionLoader; import org.jboss.logging.Logger; import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.DISCONNECT_CONSUMER; @@ -643,7 +642,7 @@ public class ActiveMQSessionContext extends SessionContext { boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge) { - return new CreateSessionMessage(name, sessionChannel.getID(), VersionLoader.getVersion().getIncrementingVersion(), username, password, minLargeMessageSize, xa, autoCommitSends, autoCommitAcks, preAcknowledge, confirmationWindow, null); + return new CreateSessionMessage(name, sessionChannel.getID(), serverVersion, username, password, minLargeMessageSize, xa, autoCommitSends, autoCommitAcks, preAcknowledge, confirmationWindow, null); } @Override