[jboss-cvs] JBossAS SVN: r91184 - trunk/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 22:44:23 EDT 2009


Author: bstansberry at jboss.com
Date: 2009-07-13 22:44:23 -0400 (Mon, 13 Jul 2009)
New Revision: 91184

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

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/session/ClusteredSession.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/session/ClusteredSession.java	2009-07-13 22:00:08 UTC (rev 91183)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/session/ClusteredSession.java	2009-07-14 02:44:23 UTC (rev 91184)
@@ -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;
@@ -1011,10 +1004,10 @@
    public void removeValue(String name) 
    {
       removeAttribute(name);
-   }   
+   }
+   
+   // ---------------------------------------------------- DistributableSession
 
-   // ------------------------------------------------------------------ Public
-
    /**
     * Gets the session id with any appended jvmRoute info removed.
     *
@@ -1112,9 +1105,11 @@
 //      }
       
       // We are no longer outdated vis a vis distributed cache
-      clearOutdated();
-   }
+      outdatedTime = 0;
+   }   
 
+   // ------------------------------------------------------------------ Public
+
    /**
     * Increment our version and propagate ourself to the distributed cache.
     */
@@ -1229,7 +1224,6 @@
       boolean outdated = getVersion() < version;
       if (outdated)
       {
-         this.outdatedVersion = version;
          outdatedTime = System.currentTimeMillis();
       }
       return outdated;
@@ -1994,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