jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r701339 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version: AbstractVersionManager.java InternalVersionHistoryImpl.java
Date Fri, 03 Oct 2008 09:38:12 GMT
Author: jukka
Date: Fri Oct  3 02:38:12 2008
New Revision: 701339

URL: http://svn.apache.org/viewvc?rev=701339&view=rev
Log:
JCR-1775: Transaction-safe versioning

Hide the generation of the version history id inside InternalVersionHistoryImpl.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java?rev=701339&r1=701338&r2=701339&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
Fri Oct  3 02:38:12 2008
@@ -26,7 +26,6 @@
 import org.apache.jackrabbit.core.state.LocalItemStateManager;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.uuid.UUID;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 import org.slf4j.Logger;
@@ -333,7 +332,7 @@
 
             // create new history node in the persistent state
             InternalVersionHistoryImpl hist = InternalVersionHistoryImpl.create(
-                    this, root, new NodeId(UUID.randomUUID()), historyNodeName, node);
+                    this, root, historyNodeName, node);
 
             // end update
             operation.save();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java?rev=701339&r1=701338&r2=701339&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
Fri Oct  3 02:38:12 2008
@@ -518,11 +518,12 @@
      */
     static InternalVersionHistoryImpl create(AbstractVersionManager vMgr,
                                              NodeStateEx parent,
-                                             NodeId historyId, Name name,
+                                             Name name,
                                              NodeState nodeState)
             throws RepositoryException {
 
         // create history node
+        NodeId historyId = new NodeId(UUID.randomUUID());
         NodeStateEx pNode = parent.addNode(name, NameConstants.NT_VERSIONHISTORY, historyId,
true);
 
         // set the versionable uuid



Mime
View raw message