jcoleman / tomcat-redis-session-manager

Redis-backed non-sticky session store for Apache Tomcat
MIT License
1.8k stars 1.12k forks source link

【suggest】Prevent concurrent session modification #73

Closed wenqibo closed 9 years ago

wenqibo commented 9 years ago

This is my suggest.thank u

jcoleman commented 9 years ago

Unfortunately this really isn't feasible given the nature of web applications where simultaneous applications are a reality.

Even if locking were implemented around the sessions, it wouldn't be reasonable to prevent a request from proceeding, which would mean that you'd have to throw an error when the 2nd request that attempts to modify the session finishes. This would mean throwing an exception in the web request after the request has already finished, leading to potentially worse side effects.