jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r628324 - in /jackrabbit/branches/1.4/jackrabbit-core: RELEASE-NOTES.txt src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Sat, 16 Feb 2008 15:24:00 GMT
Author: jukka
Date: Sat Feb 16 07:23:59 2008
New Revision: 628324

URL: http://svn.apache.org/viewvc?rev=628324&view=rev
Log:
1.4: Merged revision 613160 (JCR-1318)

Added:
    jackrabbit/branches/1.4/jackrabbit-core/RELEASE-NOTES.txt
      - copied, changed from r628266, jackrabbit/branches/1.4/RELEASE-NOTES.txt
Modified:
    jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java

Copied: jackrabbit/branches/1.4/jackrabbit-core/RELEASE-NOTES.txt (from r628266, jackrabbit/branches/1.4/RELEASE-NOTES.txt)
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/RELEASE-NOTES.txt?p2=jackrabbit/branches/1.4/jackrabbit-core/RELEASE-NOTES.txt&p1=jackrabbit/branches/1.4/RELEASE-NOTES.txt&r1=628266&r2=628324&rev=628324&view=diff
==============================================================================
--- jackrabbit/branches/1.4/RELEASE-NOTES.txt (original)
+++ jackrabbit/branches/1.4/jackrabbit-core/RELEASE-NOTES.txt Sat Feb 16 07:23:59 2008
@@ -1,4 +1,4 @@
-Release Notes -- Apache Jackrabbit -- Version 1.4
+Release Notes -- Apache Jackrabbit Core -- Version 1.4.1
 
 Introduction
 ------------

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=628324&r1=628323&r2=628324&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Sat Feb 16 07:23:59 2008
@@ -232,6 +232,7 @@
 
         log.info("Starting repository...");
 
+        boolean succeeded = false;
         try {
             this.repConfig = repConfig;
 
@@ -335,12 +336,18 @@
                 wspJanitor.setDaemon(true);
                 wspJanitor.start();
             }
+
+            succeeded = true;
+            log.info("Repository started");
         } catch (RepositoryException e) {
             log.error("failed to start Repository: " + e.getMessage(), e);
             throw e;
+        } finally {
+            if (!succeeded) {
+                // repository startup failed, clean up...
+                shutdown();
+            }
         }
-
-        log.info("Repository started");
     }
 
     public DataStore getDataStore() {
@@ -988,24 +995,30 @@
             }
         }
 
-        try {
-            vMgr.close();
-        } catch (Exception e) {
-            log.error("Error while closing Version Manager.", e);
+        if (vMgr != null) {
+            try {
+                vMgr.close();
+            } catch (Exception e) {
+                log.error("Error while closing Version Manager.", e);
+            }
         }
 
-        // persist repository properties
-        try {
-            storeRepProps(repProps);
-        } catch (RepositoryException e) {
-            log.error("failed to persist repository properties", e);
+        if (repProps != null) {
+            // persist repository properties
+            try {
+                storeRepProps(repProps);
+            } catch (RepositoryException e) {
+                log.error("failed to persist repository properties", e);
+            }
         }
 
-        try {
-            // close repository file system
-            repStore.close();
-        } catch (FileSystemException e) {
-            log.error("error while closing repository file system", e);
+        if (repStore != null) {
+            try {
+                // close repository file system
+                repStore.close();
+            } catch (FileSystemException e) {
+                log.error("error while closing repository file system", e);
+            }
         }
 
         // make sure this instance is not used anymore



Mime
View raw message