-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Expected Behavior
When a project is configured to use JDBC managed sessions, the application should handle AbstractSessionEvent events, including creation, deletion and expiration events, similar to other Spring Session implementations (eg. Redis).
Current Behavior
When using JDBC sessions, no AbstractSessionEvent events are emitted by the framework. As a result, the application cannot handle the session create, delete or expire events properly..
Context
I am configuring a stateful authentication using JDBC managed sessions together with Spring Security.
My application needs to perform some custom logic whenever the session is expired or deleted from the session store.
The custom logic needs to be done in the application layer, so a trigger in the database would not solve the issue.
It would be easier for the application to listen for session lifecycle events.
As a temporary solution, I solved the issue for my application by implementing a custom request filter that checks the session expiration time before Spring processes the request.
Would it be possible to add support for publishing AbstractSessionEvent events for JDBC session implementations, similar to other Spring Session backends?