Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-1187 Incompatible version when recreating a session with olde… #1298

Closed
wants to merge 1 commit into from

Conversation

TomasHofman
Copy link
Contributor

@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this... the purpose is the client to tell the server which version is being used... it looks wrong to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 known version and decrease the version if ActiveMQIncompatibleClientServerException is returned? I think this is how establishing new connection works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh.. I see.. you're right!

merging it.. sorry for the hassle.. just wanted to make sure what was going on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'm glad for feedback, I might have also be wrong...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants