This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes Session getting created twice and session not getting decremented. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Session getting created twice and session not getting decremented." Watch "Session getting created twice and session not getting decremented." New topic
Author

Session getting created twice and session not getting decremented.

Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

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


Regards, Prasad
SCJP 5 (93%)
 
 
subject: Session getting created twice and session not getting decremented.
 
Similar Threads
[Spring Security] No bean named 'springSecurityFilterChain' is defined
nullpointer with @Autowired AuthenticationManager
Spring security and jsf Integration
spring security form based login using database not responding
"Spring Security Application" Initiated by Apache