Reputation: 1605
I've a spring session bean which is a live while the session is a live. I confugure my web-server session time out to very long time - 24 hours. So when the user logoff from my web-app the session bean is still alive.
Is it possible to clean up/destroy the session bean programatically each time the user log off? that way, when the user will log in again he will have new instance of the session bean.
Upvotes: 0
Views: 601
Reputation:
Session Bean stored in HTTP session and removed when session expires. This managed by Servlet Container, not Spring. So, to destroy Session Bean you need use Servlet API, not Spring API.
Check, are you using the following annotation for your session beans?
@org.springframework.context.annotation.Scope("session")
Upvotes: 2