tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Radivoj Milin" <l...@prozone.co.yu>
Subject There is a problem in 'SessionManager' implementation
Date Wed, 06 Jul 2005 11:21:32 GMT
Hi,
 
There is a problem in 'SessionManager' implementation regarding count of expired sessions.
 
In 'org.apache.catalina.session.ManagerBase' class:
 
For each session, method 'ManagerBase.processExpires()' calls ''org.apache.catalina.session.StandardSession.isValid()'
method and increments number of expired session (in case that session isn`t valid)
      ............... 
      if (!sessions[i].isValid()) {
                expiredSessions++;
                expireHere++;
            }
       .............
 
But, 'StandardSession.isValid()' method triggers 'StandardSession.expire(true)' method in
cases when session should be invalidated. This method also increments number of expired sessions
('SessionManager' attribute).
 
expire(boolean value)
        .......
                int numExpired = manager.getExpiredSessions();
                numExpired++;
                manager.setExpiredSessions(numExpired);
        ........
 
At the end, as result of session invalidation process, number of expired sessions is doubled.
 
Regards,
    Radivoj Milin
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message