I am using Spring Security in our application. It works fine, but sometimes, spring security created two session for the same login. We are printing the number of active sessions for the user, here it prints 2, even if i am sure, user not logged in from anywhere, also, sometimes, counter(session) doesn't get decremented. Below, is my security-config.xml
In my web.xml, I have the below listener tag
I am getting the number of active sessions for the user and the total number of sessions, using the below code.
here, sessionRegistry is autowired, can you please let me know, where we are doing wrong?