Closed ajdevries closed 7 years ago
spring-sesion's session objects are not mutable by default for performance reasons, see https://github.com/spring-projects/spring-session/issues/177
If you want to make them mutable you can either the grails 3 spring-session plugin wich has this as a config option https://github.com/jeetmp3/spring-session
Or
Implement your own session synchronizer (this is the approach I take, and only update if the flash object has changed) - you can find an example from the same plugin mentioned above https://github.com/jeetmp3/spring-session/blob/master/src/main/java/org/grails/plugins/springsession/web/http/HttpSessionSynchronizer.java
Stack overflow or slack are probably better places to ask these types of questions.
Thanks for your reply. So if I want to do redis session replication in grails, what is the best option there?
When using https://github.com/jeetmp3/spring-session it works, thanks @erichelgeson for helping out!
Thanks for reporting an issue for Grails framework, please review the task list below before submitting the issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (http://stackoverflow.com/tags/grails) or Slack (http://slack-signup.grails.org). DO NOT use the issue tracker to ask questions.
Task List
Steps to Reproduce
https://github.com/ajdevries/grails-redis-spring
grails run-app
Expected Behaviour
Expecting a flash message
Actual Behaviour
No flash message is shown, probably cleaned up or not saved in the session?
Environment Information
Example Application