jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alex...@apache.org
Subject svn commit: r831932 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Mon, 02 Nov 2009 15:58:05 GMT
Author: alexkli
Date: Mon Nov  2 15:58:05 2009
New Revision: 831932

URL: http://svn.apache.org/viewvc?rev=831932&view=rev
Log:
JCR-2378: Avoid exceptions thrown in finalize handler of RepositoryImpl constructor

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=831932&r1=831931&r2=831932&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Mon Nov  2 15:58:05 2009
@@ -381,8 +381,15 @@
             throw e;
         } finally {
             if (!succeeded) {
-                // repository startup failed, clean up...
-                shutdown();
+                try {
+                    // repository startup failed, clean up...
+                    shutdown();
+                } catch (Throwable t) {
+                    // ensure this exception does not overlay the original
+                    // startup exception and only log it
+                    log.error("In addition to startup fail, another unexpected problem "
+
+                    		"occurred while shutting down the repository again.", t);
+                }
             }
         }
     }



Mime
View raw message