tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1044359 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/manager/ java/org/apache/catalina/session/ webapps/docs/
Date Fri, 10 Dec 2010 13:54:16 GMT
Author: markt
Date: Fri Dec 10 13:54:16 2010
New Revision: 1044359

URL: http://svn.apache.org/viewvc?rev=1044359&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50448
Regression caused by http://svn.apache.org/viewvc?view=revision&revision=1036281

Modified:
    tomcat/trunk/java/org/apache/catalina/Session.java
    tomcat/trunk/java/org/apache/catalina/manager/DummyProxySession.java
    tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
    tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/Session.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Session.java?rev=1044359&r1=1044358&r2=1044359&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/Session.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Session.java Fri Dec 10 13:54:16 2010
@@ -90,6 +90,13 @@ public interface Session {
 
 
     /**
+     * Return the creation time for this session, bypassing the session validity
+     * checks.
+     */
+    public long getCreationTimeInternal();
+
+
+    /**
      * Set the creation time for this session.  This method is called by the
      * Manager when an existing Session instance is reused.
      *

Modified: tomcat/trunk/java/org/apache/catalina/manager/DummyProxySession.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/DummyProxySession.java?rev=1044359&r1=1044358&r2=1044359&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/manager/DummyProxySession.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/DummyProxySession.java Fri Dec 10 13:54:16
2010
@@ -64,6 +64,11 @@ public class DummyProxySession implement
     }
 
     @Override
+    public long getCreationTimeInternal() {
+        return 0;
+    }
+
+    @Override
     public String getId() {
         return sessionId;
     }

Modified: tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=1044359&r1=1044358&r2=1044359&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java Fri Dec 10 13:54:16 2010
@@ -799,7 +799,8 @@ public abstract class ManagerBase extend
         // the manager because it is being persisted - update the expired stats
         if (update) {
             long timeNow = System.currentTimeMillis();
-            int timeAlive = (int) ((timeNow - session.getCreationTime())/1000);
+            int timeAlive =
+                (int) (timeNow - session.getCreationTimeInternal())/1000;
             updateSessionMaxAliveTime(timeAlive);
             expiredSessions.incrementAndGet();
             SessionTiming timing = new SessionTiming(timeNow, timeAlive);

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=1044359&r1=1044358&r2=1044359&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Fri Dec 10 13:54:16
2010
@@ -1102,6 +1102,16 @@ public class StandardSession implements 
 
 
     /**
+     * Return the time when this session was created, in milliseconds since
+     * midnight, January 1, 1970 GMT, bypassing the session validation checks.
+     */
+    @Override
+    public long getCreationTimeInternal() {
+        return this.creationTime;
+    }
+
+
+    /**
      * Return the ServletContext to which this session belongs.
      */
     @Override

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1044359&r1=1044358&r2=1044359&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Dec 10 13:54:16 2010
@@ -126,6 +126,10 @@
         <bug>50413</bug>: Ensure 304 responses are not returned when using
         static files as error pages. (markt)
       </fix>
+      <fix>
+        <bug>50448</bug>: Fix possible <code>IllegalStateException</code>
+        caused by recent session management refactoring. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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


Mime
View raw message