Author: markt
Date: Thu Jun  4 13:45:47 2009
New Revision: 781735

URL: http://svn.apache.org/viewvc?rev=781735&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46717
Hard to reproduce thread safety issue with session expiration

Modified:
    
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
    
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java?rev=781735&r1=781734&r2=781735&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
 Thu Jun  4 13:45:47 2009
@@ -192,7 +192,7 @@
     /**
      * The last accessed time for this Session.
      */
-    protected long lastAccessedTime = creationTime;
+    protected volatile long lastAccessedTime = creationTime;
 
 
     /**
@@ -267,7 +267,7 @@
     /**
      * The current accessed time for this session.
      */
-    protected long thisAccessedTime = creationTime;
+    protected volatile long thisAccessedTime = creationTime;
 
 
     /**

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java?rev=781735&r1=781734&r2=781735&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 Thu Jun  4 13:45:47 2009
@@ -163,7 +163,7 @@
     /**
      * The last accessed time for this Session.
      */
-    private long lastAccessedTime = creationTime;
+    private volatile long lastAccessedTime = creationTime;
 
     /**
      * The session event listeners for this Session.
@@ -233,7 +233,7 @@
     /**
      * The current accessed time for this session.
      */
-    private long thisAccessedTime = creationTime;
+    private volatile long thisAccessedTime = creationTime;
 
     /**
      * only the primary session will expire, or be able to expire due to

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=781735&r1=781734&r2=781735&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Jun  4 13:45:47 2009
@@ -115,6 +115,10 @@
         (markt)
       </fix>
       <fix>
+        <bug>46717</bug>: Fix hard to reproduce thread safety issue with 
session
+        expiration. (markt)
+      </fix>
+      <fix>
         Improve handling of situation where web application tries to configure
         logging at the context level but the security policy prevents this.
         (markt/rjung)



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

Reply via email to