spring-session
spring-session copied to clipboard
invalidate does not work on session objects handed out to HttpSessionListener
Using Spring Session 1.3.0
If a HttpSessionListener is added, it correctly gets events sent to it by the Spring Session SessionEventHttpSessionListenerAdapter.
However, if the listener then calls invalidate() on the session object received, then nothing happens.
The code in SessionEventHttpSessionListenerAdapter.createHttpSessionEvent looks fishy, it just does a new ExpiringSessionHttpSession, that object is in no way connected to the rest of Spring Session.
I have similar problem. We use JavaMelody. It calls session.invalidate() and in fact session doesn't delete from registry. Issue in JavaMelody repo