tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1725264 - /tomcat/trunk/java/org/apache/catalina/session/StandardManager.java
Date Mon, 18 Jan 2016 13:15:20 GMT
Author: markt
Date: Mon Jan 18 13:15:20 2016
New Revision: 1725264

URL: http://svn.apache.org/viewvc?rev=1725264&view=rev
Log:
Revert r1725201 as discussed on dev list

Modified:
    tomcat/trunk/java/org/apache/catalina/session/StandardManager.java

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardManager.java?rev=1725264&r1=1725263&r2=1725264&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StandardManager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardManager.java Mon Jan 18 13:15:20
2016
@@ -225,17 +225,11 @@ public class StandardManager extends Man
                         }
                         sessionCounter++;
                     }
-
+                } finally {
                     // Delete the persistent storage file
                     if (file.exists()) {
                         file.delete();
                     }
-                } catch (Throwable t) {
-                    // Clearing the partially loaded sessions here prevents the
-                    // stop() method overwriting the file where the session data
-                    // is stored.
-                    sessions.clear();
-                    throw t;
                 }
             }
         } catch (FileNotFoundException e) {
@@ -284,8 +278,6 @@ public class StandardManager extends Man
             log.debug(sm.getString("standardManager.unloading.debug"));
 
         if (sessions.isEmpty()) {
-            // This is important in the case where the load fails since it
-            // prevents the overwriting of the data that failed to load.
             log.debug(sm.getString("standardManager.unloading.nosessions"));
             return; // nothing to do
         }
@@ -362,7 +354,7 @@ public class StandardManager extends Man
             load();
         } catch (Throwable t) {
             ExceptionUtils.handleThrowable(t);
-            throw new LifecycleException(sm.getString("standardManager.managerLoad"), t);
+            log.error(sm.getString("standardManager.managerLoad"), t);
         }
 
         setState(LifecycleState.STARTING);



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


Mime
View raw message