jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r156152 - in incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: RepositoryImpl.java version/VersionManagerImpl.java
Date Fri, 04 Mar 2005 13:12:02 GMT
Author: tripod
Date: Fri Mar  4 05:12:00 2005
New Revision: 156152

URL: http://svn.apache.org/viewcvs?view=rev&rev=156152
Log:
- fixing startup issue with empty repository

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

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java?view=diff&r1=156151&r2=156152
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java Fri
Mar  4 05:12:00 2005
@@ -259,7 +259,7 @@
                 nsReg,
                 ntReg);
         pvMgr = new NativePVM(pm, getNodeTypeRegistry());
-        vMgr = new VersionManagerImpl(pvMgr, ntReg, VERSION_STORAGE_NODE_UUID);
+        vMgr = new VersionManagerImpl(pvMgr, ntReg, VERSION_STORAGE_NODE_UUID, SYSTEM_ROOT_NODE_UUID);
 
         // initialize workspaces
         iter = wspInfos.keySet().iterator();

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java?view=diff&r1=156151&r2=156152
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
Fri Mar  4 05:12:00 2005
@@ -19,7 +19,6 @@
 import org.apache.jackrabbit.core.*;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
 import org.apache.jackrabbit.core.state.ItemStateManager;
-import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.virtual.VirtualItemStateProvider;
 import org.apache.log4j.Logger;
@@ -41,12 +40,18 @@
      * the default logger
      */
     private static Logger log = Logger.getLogger(VersionManager.class);
+
     /**
      * The root node UUID for the version storage
      */
     private final String VERSION_STORAGE_NODE_UUID;
 
     /**
+     * The root parent node UUID for the version storage
+     */
+    private final String VERSION_STORAGE_PARENT_NODE_UUID;
+
+    /**
      * The version manager of the internal versions
      */
     private final PersistentVersionManager vMgr;
@@ -65,10 +70,12 @@
      *
      * @param vMgr
      */
-    public VersionManagerImpl(PersistentVersionManager vMgr, NodeTypeRegistry ntReg, String
rootUUID) {
+    public VersionManagerImpl(PersistentVersionManager vMgr, NodeTypeRegistry ntReg,
+                              String rootUUID, String rootParentUUID) {
         this.vMgr = vMgr;
         this.ntReg = ntReg;
         this.VERSION_STORAGE_NODE_UUID = rootUUID;
+        this.VERSION_STORAGE_PARENT_NODE_UUID = rootParentUUID;
     }
 
     /**
@@ -82,8 +89,7 @@
         if (virtProvider == null) {
             try {
                 // init the definition id mgr
-                NodeState virtRootState = (NodeState) base.getItemState(new NodeId(VERSION_STORAGE_NODE_UUID));
-                virtProvider = new VersionItemStateProvider(this, ntReg, VERSION_STORAGE_NODE_UUID,
virtRootState.getParentUUID());
+                virtProvider = new VersionItemStateProvider(this, ntReg, VERSION_STORAGE_NODE_UUID,
VERSION_STORAGE_PARENT_NODE_UUID);
             } catch (Exception e) {
                 // todo: better error handling
                 log.error("Error while initializing virtual items.", e);



Mime
View raw message