jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1058576 - /jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Thu, 13 Jan 2011 14:16:24 GMT
Author: thomasm
Date: Thu Jan 13 14:16:24 2011
New Revision: 1058576

URL: http://svn.apache.org/viewvc?rev=1058576&view=rev
Log:
JCR-2860 Make version recovery extensible

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

Modified: jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=1058576&r1=1058575&r2=1058576&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Thu Jan 13 14:16:24 2011
@@ -2010,13 +2010,7 @@ public class RepositoryImpl extends Abst
                     new File(config.getHomeDir()), fs,
                     config.getPersistenceManagerConfig());
 
-            // JCR-2551: Recovery from a lost version history
-            if (Boolean.getBoolean("org.apache.jackrabbit.version.recovery")) {
-                RepositoryChecker checker = new RepositoryChecker(
-                        persistMgr, context.getInternalVersionManager());
-                checker.check(ROOT_NODE_ID, true);
-                checker.fix();
-            }
+            doVersionRecovery();
 
             ISMLocking ismLocking = config.getISMLocking();
 
@@ -2051,6 +2045,19 @@ public class RepositoryImpl extends Abst
         }
 
         /**
+         * If necessary, recover from a lost version history.
+         */
+        protected void doVersionRecovery() throws RepositoryException {
+            // JCR-2551: Recovery from a lost version history
+            if (Boolean.getBoolean("org.apache.jackrabbit.version.recovery")) {
+                RepositoryChecker checker = new RepositoryChecker(
+                        persistMgr, context.getInternalVersionManager());
+                checker.check(ROOT_NODE_ID, true);
+                checker.fix();
+            }
+        }
+
+        /**
          * Initializes the search manager of this workspace info. This method
          * is called while still holding the write lock on this workspace
          * info, but {@link #initialized} is already set to <code>true</code>.



Mime
View raw message