spring-session icon indicating copy to clipboard operation
spring-session copied to clipboard

Add SessionContextHolder

Open rwinch opened this issue 10 years ago • 0 comments

Add the Session to a SessionContextHolder similar to SecurityContextHolder. The SessionContextHolder would store the Session in a ThreadLocal. This will allow users to access the current Session anywhere within their stack. For example:

Session session = SessionContextHolder.getSession();

We would also want to have the SessionRepositoryFilter populate and clear out the SessionContextHolder (similar to SecurityContextPersistenceFilter).

rwinch avatar Jul 24 '15 21:07 rwinch