tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1153854 - in /tomcat/trunk: java/org/apache/catalina/session/StoreBase.java webapps/docs/changelog.xml
Date Thu, 04 Aug 2011 11:45:54 GMT
Author: kfujino
Date: Thu Aug  4 11:45:53 2011
New Revision: 1153854

URL: http://svn.apache.org/viewvc?rev=1153854&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51614
Avoid two times calls of store.load() and session.expire() in PersistentManager.

Modified:
    tomcat/trunk/java/org/apache/catalina/session/StoreBase.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/session/StoreBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StoreBase.java?rev=1153854&r1=1153853&r2=1153854&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StoreBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/StoreBase.java Thu Aug  4 11:45:53 2011
@@ -168,12 +168,16 @@ public abstract class StoreBase extends 
                     manager.getContainer().getLogger().debug(getStoreName()+ ": processExpires
expire store session " + keys[i] );
                 }
                 boolean isLoaded = false;
-                try {
-                    if (manager.findSession(keys[i]) != null) {
-                        isLoaded = true;
+                if (manager instanceof PersistentManagerBase) {
+                    isLoaded = ((PersistentManagerBase) manager).isLoaded(keys[i]);
+                } else {
+                    try {
+                        if (manager.findSession(keys[i]) != null) {
+                            isLoaded = true;
+                        }
+                    } catch (IOException ioe) {
+                        // Ignore - session will be expired
                     }
-                } catch (IOException ioe) {
-                    // Ignore - session will be expired
                 }
                 if (isLoaded) {
                     // recycle old backup session

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1153854&r1=1153853&r2=1153854&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Aug  4 11:45:53 2011
@@ -129,6 +129,10 @@
         Allow to have several AccessLogValve instances in the same scope (e.g.
         in the same Context). (kkolinko)
       </fix>
+      <fix>
+        <bug>51614</bug>: Avoid two times calls of store.load() and 
+        session.expire() in PersistentManager. (kfujino)
+      </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