Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50232
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 9 Nov 2010 15:31:19 +0000 (15:31 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 9 Nov 2010 15:31:19 +0000 (15:31 +0000)
Remove dependency between StoreBase and PersistentManager and associated code clean-up.
Patch provided by Tiago Batista.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1033024 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/session/StoreBase.java
webapps/docs/changelog.xml

index 46f62fc..178619e 100644 (file)
@@ -167,7 +167,15 @@ public abstract class StoreBase extends LifecycleBase implements Store {
                 if (manager.getContainer().getLogger().isDebugEnabled()) {
                     manager.getContainer().getLogger().debug(getStoreName()+ ": processExpires expire store session " + keys[i] );
                 }
-                if ( ( (PersistentManagerBase) manager).isLoaded( keys[i] )) {
+                boolean isLoaded = false;
+                try {
+                    if (manager.findSession(keys[i]) != null) {
+                        isLoaded = true;
+                    }
+                } catch (IOException ioe) {
+                    // Ignore - session will be expired
+                }
+                if (isLoaded) {
                     // recycle old backup session
                     session.recycle();
                 } else {
index 23316bc..de041b0 100644 (file)
         Correct infinite loop if <code>ServletRequest.startAsync(ServletRequest,
         ServletResponse)</code> was called. (markt)
       </fix>
+      <fix>
+        <bug>50232</bug>: Remove dependency between StoreBase and
+        PersistentManager and associated code clean-up. Patch provided by
+        Tiago Batista. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">