tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r898379 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/session/StoreBase.java
Date Tue, 12 Jan 2010 15:39:19 GMT
Author: jim
Date: Tue Jan 12 15:39:19 2010
New Revision: 898379

URL: http://svn.apache.org/viewvc?rev=898379&view=rev
Log:
java/org/apache/catalina/session/StoreBase.java

* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48345
  Sessions timed out too early when using PersistentManager
    Port of patch by Keiichi Fujino
      http://people.apache.org/~markt/patches/2009-12-30-bug48345.patch
        +1: markt, rjung, jim
          -1: 



Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StoreBase.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=898379&r1=898378&r2=898379&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jan 12 15:39:19 2010
@@ -28,13 +28,6 @@
 PATCHES ACCEPTED TO BACKPORT:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48345
-  Sessions timed out too early when using PersistentManager
-  Port of patch by Keiichi Fujino
-  http://people.apache.org/~markt/patches/2009-12-30-bug48345.patch
-  +1: markt, rjung, jim
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48464
   Provide an option to specify the command window title
   Patch provided by LiuYan

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StoreBase.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StoreBase.java?rev=898379&r1=898378&r2=898379&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StoreBase.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StoreBase.java Tue Jan 12 15:39:19
2010
@@ -189,14 +189,15 @@
         if (manager.getContainer().getLogger().isDebugEnabled()) {
             manager.getContainer().getLogger().debug(getStoreName()+ ": processExpires check
number of " + keys.length + " sessions" );
         }
-    
+
         for (int i = 0; i < keys.length; i++) {
             try {
                 StandardSession session = (StandardSession) load(keys[i]);
                 if (session == null) {
                     continue;
                 }
-                if (session.isValid()) {
+                int timeIdle = (int) ((timeNow - session.thisAccessedTime) / 1000L);
+                if (timeIdle < session.getMaxInactiveInterval()) {
                     continue;
                 }
                 if (manager.getContainer().getLogger().isDebugEnabled()) {
@@ -209,7 +210,7 @@
                     // expire swapped out session
                     session.expire();
                 }
-                remove(session.getIdInternal());
+                remove(keys[i]);
             } catch (Exception e) {
                 manager.getContainer().getLogger().error("Session: "+keys[i]+"; ", e);
                 try {



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


Mime
View raw message