[jboss-cvs] JBossAS SVN: r91177 - branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/session.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jul 13 16:08:30 EDT 2009


Author: bstansberry at jboss.com
Date: 2009-07-13 16:08:30 -0400 (Mon, 13 Jul 2009)
New Revision: 91177

Modified:
   branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/session/ClusteredSession.java
Log:
[JBAS-7091] Incorrect handling of timestamps in clustered session

Modified: branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/session/ClusteredSession.java
===================================================================
--- branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/session/ClusteredSession.java	2009-07-13 19:53:57 UTC (rev 91176)
+++ branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/session/ClusteredSession.java	2009-07-13 20:08:30 UTC (rev 91177)
@@ -316,12 +316,6 @@
    private volatile transient DistributableSessionMetadata metadata = new DistributableSessionMetadata();
    
    /**
-    * The last version that was passed to {@link #setDistributedVersion} or
-    * <code>0</code> if <code>setIsOutdated(false)</code> was subsequently called.
-    */
-   private volatile transient int outdatedVersion;
-   
-   /**
     * The last time {@link #setIsOutdated  setIsOutdated(true)} was called or
     * <code>0</code> if <code>setIsOutdated(false)</code> was subsequently called.
     */
@@ -690,7 +684,6 @@
       
       invalidationPolicy = ReplicationTrigger.ACCESS;
       outdatedTime = 0;
-      outdatedVersion = 0;
       sessionAttributesDirty = false;
       sessionMetadataDirty = false;
       realId = null;
@@ -1144,7 +1137,7 @@
 //      }
       
       // We are no longer outdated vis a vis distributed cache
-      clearOutdated();
+      outdatedTime = 0;
    }   
 
    // ------------------------------------------------------------------ Public
@@ -1265,7 +1258,6 @@
       boolean outdated = getVersion() < version;
       if (outdated)
       {
-         this.outdatedVersion = version;
          outdatedTime = System.currentTimeMillis();
       }
       return outdated;
@@ -1996,24 +1988,4 @@
       }
    }
 
-   private final void clearOutdated()
-   {
-      // Only overwrite the access time if access() hasn't been called
-      // since setOutdatedVersion() was called
-      if (outdatedTime > thisAccessedTime)
-      {
-         lastAccessedTime = thisAccessedTime;
-         thisAccessedTime = outdatedTime;
-      }
-      outdatedTime = 0;
-      
-      // Only overwrite the version if the outdated version is greater
-      // Otherwise when we first unmarshall a session that has been
-      // replicated many times, we will reset the version to 0
-      if (outdatedVersion > version.get())
-         version.set(outdatedVersion);
-      
-      outdatedVersion = 0;
-   }
-
-}
\ No newline at end of file
+}




More information about the jboss-cvs-commits mailing list