activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TomasHofman <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1298: ARTEMIS-1187 Incompatible version when ...
Date Wed, 31 May 2017 08:16:32 GMT
Github user TomasHofman commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1298#discussion_r119296506
  
    --- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
---
    @@ -686,7 +686,7 @@ protected CreateSessionMessage newCreateSession(String username,
                                                        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);
    --- End diff --
    
    The ```newCreateSession()``` is only called in ```recreateSession()``` method, so my reasoning
was that the message will be sent to the same server that the client was previously connected
to (is that correct?), so the serverVersion that was previously established can be reused.
    
    The alternative could be to start a cycle of CreateSessionMessages with the highest know
version and decrease the version if ```ActiveMQIncompatibleClientServerException``` is returned?
I think this is how establishing new connection works.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message