tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51614] New: PersistentManager loads session from Store and calls session.expire() twice.
Date Thu, 04 Aug 2011 11:19:47 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51614

             Bug #: 51614
           Summary: PersistentManager loads session from Store and calls
                    session.expire() twice.
           Product: Tomcat 7
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: kfujino@apache.org
    Classification: Unclassified


To check whether session is loaded into  memory, StoreBase#processExpires calls
findSession(id). 

=====
...
if (manager.findSession(keys[i]) != null) {
    isLoaded = true;
}
...
=====

However, PersistentManager#findSession(id) loads session from Store when there
is no session in memory. 
Because session loaded from Store is an invalid session
PersistentManager logs errorlog, calls session.expire(), and deletes session
from Store. 

As a result, findSession(id) returns null, and isLoaded becomes false. 
And, session.expire() is called again, and the session is deleted from Store.

If manager is PersistentManager, it is necessary to call
PersistentManagerBase#isLoaded(id). 
However, to avoid regression of r1033024, other managers call findSession(id).

Best regards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message