• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session getting created twice and session not getting decremented.

 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Java Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
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?

P:S: posted here also,Spring forum
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!