-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged

Description
In our project we use org.springframework.session.web.http.SessionEventHttpSessionListenerAdapter
to handle SessionCreatedEvents. Unfortunately, the RedisOperationsSessionRepository only publishes SessionCreatedEvents containing a MapSession, instead of a RedisSession:
Lines 586 to 590 in 0c9fbed
private void handleCreated(Map<Object, Object> loaded, String channel) { | |
String id = channel.substring(channel.lastIndexOf(":") + 1); | |
Session session = loadSession(id, loaded); | |
publishEvent(new SessionCreatedEvent(this, session)); | |
} |
Due to this, attributes set to this session by Listeners (e.g. org.springframework.web.util.HttpSessionMutexListener
) will not be saved to Redis and are lost. This was not expected behaviour for us.
Changing Line 588 to
Session session = new RedisSession(loadSession(id, loaded));
as in
Line 474 in 0c9fbed
RedisSession result = new RedisSession(loaded); |
would propably solve the issue, but I don't know, whether this would induce other problems.
adamklinkosz
Metadata
Metadata
Assignees
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged