Add support for LAST_ACCESS_AT_START system property to DeltaSession.
authorkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 23 Aug 2010 04:57:49 +0000 (04:57 +0000)
committerkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 23 Aug 2010 04:57:49 +0000 (04:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@987995 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/ha/session/DeltaSession.java
webapps/docs/changelog.xml

index 9eb9708..f9fc581 100644 (file)
@@ -349,7 +349,12 @@ public class DeltaSession extends StandardSession implements Externalizable,Clus
         }
         if (maxInactiveInterval >= 0) {
             long timeNow = System.currentTimeMillis();
-            int timeIdle = (int) ( (timeNow - thisAccessedTime) / 1000L);
+            int timeIdle;
+            if (LAST_ACCESS_AT_START) {
+                timeIdle = (int) ((timeNow - lastAccessedTime) / 1000L);
+            } else {
+                timeIdle = (int) ((timeNow - thisAccessedTime) / 1000L);
+            }
             if (isPrimarySession()) {
                 if (timeIdle >= maxInactiveInterval) {
                     expire(true);
index 8577868..17ad106 100644 (file)
       <fix>
         Add Null check when CHANGE_SESSION_ID message received. (kfujino)
       </fix>
+      <fix>
+        Add support for LAST_ACCESS_AT_START system property to DeltaSession. 
+        (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">