Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Work with SpringSessionSynchronization changes from Spring 4.1.0.RC2 - #46

Closed
candrews wants to merge 1 commit into
apache:3.xfrom
candrews:patch-4
Closed

candrews wants to merge 1 commit into
apache:3.xfrom
candrews:patch-4

Conversation

@candrews

Copy link
Copy Markdown
Contributor

In Spring 4.1.0.RC2, the SpringSessionSynchronization constructor changed. See https://jira.spring.io/browse/SPR-9020

This commit ensures compatibility with Spring before 4.1.0.RC2 and after 4.1.0.RC2.

The signature change to the SpringSessionSynchronization constructor was the addition of a new "bool" parameter named "newSession". Here's the commit in Spring: spring-projects/spring-framework@5cbb1fc#diff-4340a4820b773949b5258699f411324f
I'm not positive I got the logic right in my commit. I'm hoping one of you folks who knows more about this part of the Grails code can tell if the logic is right around "newSession" - I set it true always in this commit, but I don't know if that's correct.

@lhotari

lhotari commented Oct 20, 2014

Copy link
Copy Markdown
Member

@candrews
Thanks for the effort.

It looks like it will automatically unbind the session from the TransactionSynchronizationManager and close the session if newSession=true. It's probably not desired when using a OSIV session.
It might require some more changes to GrailsSessionContext so that the logic is similar to the changes in SpringSessionContext in spring-projects/spring-framework@5cbb1fc
I believe GrailsSessionContext is originally shadowing SpringSessionContext functionality.

In Spring 4.1.0.RC2, the SpringSessionSynchronization constructor changed. See https://jira.spring.io/browse/SPR-9020

This commit ensures compatibility with Spring before 4.1.0.RC2 and after 4.1.0.RC2.
@lhotari

lhotari commented Oct 22, 2014

Copy link
Copy Markdown
Member

@candrews Have you already added a Jira issue for tracking this issue? I'd like to start working on this soon so that we get Spring 4.1 support working with Grails 2.4.x branch.

@candrews

Copy link
Copy Markdown
Contributor Author

@lhotari

lhotari commented Oct 30, 2014

Copy link
Copy Markdown
Member

@lhotari

lhotari commented Oct 31, 2014

Copy link
Copy Markdown
Member

Should be fixed for 4.1.2: spring-projects/spring-framework@7aff5754

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants