jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r368777 - /incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Fri, 13 Jan 2006 16:32:13 GMT
Author: tripod
Date: Fri Jan 13 08:32:09 2006
New Revision: 368777

URL: http://svn.apache.org/viewcvs?rev=368777&view=rev
Log:
enabling override of versionmanager implementation

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

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=368777&r1=368776&r2=368777&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Fri Jan 13 08:32:09 2006
@@ -209,15 +209,7 @@
         }
 
         // init version manager
-        VersioningConfig vConfig = repConfig.getVersioningConfig();
-        PersistenceManager pm = createPersistenceManager(vConfig.getHomeDir(),
-                vConfig.getFileSystem(),
-                vConfig.getPersistenceManagerConfig(),
-                rootNodeUUID,
-                nsReg,
-                ntReg);
-        vMgr = new VersionManagerImpl(pm, ntReg, delegatingDispatcher,
-                VERSION_STORAGE_NODE_UUID, SYSTEM_ROOT_NODE_UUID);
+        vMgr = createVersionManager(repConfig.getVersioningConfig());
 
         // init virtual nodetype manager
         virtNTMgr = new VirtualNodeTypeStateManager(getNodeTypeRegistry(),
@@ -241,6 +233,24 @@
         // todo FIXME it seems odd that the *global* virtual node type manager
         // is using a session that is bound to a single specific workspace
         virtNTMgr.setSession(getSystemSession(repConfig.getDefaultWorkspaceName()));
+    }
+
+    /**
+     * Creates the version manager.
+     *
+     * @param vConfig the versioning config
+     * @return the newly created version manager
+     * @throws RepositoryException if an error occurrs
+     */
+    protected VersionManager createVersionManager(VersioningConfig vConfig)
+            throws RepositoryException {
+        PersistenceManager pm = createPersistenceManager(vConfig.getHomeDir(),
+                vConfig.getFileSystem(),
+                vConfig.getPersistenceManagerConfig(),
+                rootNodeUUID,
+                nsReg,
+                ntReg);
+        return new VersionManagerImpl(pm, ntReg, delegatingDispatcher, VERSION_STORAGE_NODE_UUID,
SYSTEM_ROOT_NODE_UUID);
     }
 
     /**



Mime
View raw message