jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1057181 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Mon, 10 Jan 2011 13:14:08 GMT
Author: thomasm
Date: Mon Jan 10 13:14:07 2011
New Revision: 1057181

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

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=1057181&r1=1057180&r2=1057181&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 Jan 10 13:14:07 2011
@@ -2016,13 +2016,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();
 
@@ -2057,6 +2051,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