DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=43216>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43216 Summary: ACTIVITY_CHECK does not work correctly when Tomcat is restarted Product: Tomcat 6 Version: 6.0.14 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I noticed that org.apache.catalina.session.StandardSession.ACTIVITY_CHECK does not work correctly because the StandardSession#accessCount will be set as -1 when Tomcat is restarted and session is loaded from the SESSION.ser file. StandardManager#doLoad() calls session.endAccess() and this method execute 2 things. * set isNew = false * decrement accessCount I think isNew attribute is already set by session.readObjectData(ois) in StandardManager#doLoad(), and accessCount is already set as 0. IMHO, it is not necessary calling session.endAccess() in the doLoad(). Here is a patch. Index: /tc6.0.x/trunk/java/org/apache/catalina/session/StandardManager.java =================================================================== --- /tc6.0.x/trunk/java/org/apache/catalina/session/StandardManager.java (revision 569774) +++ /tc6.0.x/trunk/java/org/apache/catalina/session/StandardManager.java (working copy) @@ -395,7 +395,6 @@ session.setManager(this); sessions.put(session.getIdInternal(), session); session.activate(); - session.endAccess(); } } catch (ClassNotFoundException e) { log.error(sm.getString("standardManager.loading.cnfe", e), e); -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]