jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1069811 - in /jackrabbit/branches/2.1: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/
Date Fri, 11 Feb 2011 14:28:10 GMT
Author: jukka
Date: Fri Feb 11 14:28:09 2011
New Revision: 1069811

URL: http://svn.apache.org/viewvc?rev=1069811&view=rev
Log:
2.1: Merged revisions 1065610 and 1067910 (JCR-2865 and JCR-2881)

Added:
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java
      - copied, changed from r1065610, jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java
Modified:
    jackrabbit/branches/2.1/   (props changed)
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerBase.java
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplBase.java

Propchange: jackrabbit/branches/2.1/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb 11 14:28:09 2011
@@ -1,5 +1,6 @@
 /jackrabbit/branches/1.5:794012,794100,794102
+/jackrabbit/branches/2.2:1065610,1067910
 /jackrabbit/sandbox/JCR-1456:774917-886178
 /jackrabbit/sandbox/JCR-2170:812417-816332
 /jackrabbit/sandbox/tripod-JCR-2209:795441-795863
-/jackrabbit/trunk:931121,931479,931483-931484,931504,931609,931613,931838,931919,932318-932319,933144,933197,933203,933213,933216,933554,933646,933694,934405,934412,934849,935557,936668,938099,945528,950440,950680,955222,955229,955307,955852,961487,961626,964362,965539,986682,986686,986715,991144,995411-995412,996810,999298-999299,999965,1000947,1001707,1002065-1002066,1002084,1002101-1002102,1002168,1002170,1002589,1002608,1002657,1002729,1003423,1003470,1003542,1003773,1004182,1004184,1004223-1004224,1004652,1005057,1005112,1036117,1036336-1036337,1038201,1039064,1039423,1040090
+/jackrabbit/trunk:931121,931479,931483-931484,931504,931609,931613,931838,931919,932318-932319,933144,933197,933203,933213,933216,933554,933646,933694,934405,934412,934849,935557,936668,938099,945528,950440,950680,955222,955229,955307,955852,961487,961626,964362,965539,986682,986686,986715,991144,995411-995412,996810,999298-999299,999965,1000947,1001707,1002065-1002066,1002084,1002101-1002102,1002168,1002170,1002589,1002608,1002657,1002729,1003423,1003470,1003542,1003773,1004182,1004184,1004223-1004224,1004652,1005057,1005112,1036117,1036336-1036337,1038201,1039064,1039423,1040090,1065599

Modified: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java?rev=1069811&r1=1069810&r2=1069811&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
Fri Feb 11 14:28:09 2011
@@ -26,6 +26,7 @@ import javax.jcr.RepositoryException;
 import org.apache.jackrabbit.core.cluster.WorkspaceRecord.CreateWorkspaceAction;
 import org.apache.jackrabbit.core.config.ClusterConfig;
 import org.apache.jackrabbit.core.id.NodeId;
+import org.apache.jackrabbit.core.journal.AbstractJournal;
 import org.apache.jackrabbit.core.journal.InstanceRevision;
 import org.apache.jackrabbit.core.journal.Journal;
 import org.apache.jackrabbit.core.journal.JournalException;
@@ -35,6 +36,7 @@ import org.apache.jackrabbit.core.journa
 import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
 import org.apache.jackrabbit.core.observation.EventState;
 import org.apache.jackrabbit.core.state.ChangeLog;
+import org.apache.jackrabbit.core.version.InternalVersionManagerImpl;
 import org.apache.jackrabbit.core.xml.ClonedInputSource;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.slf4j.Logger;
@@ -635,6 +637,11 @@ public class ClusterNode implements Runn
         public void setListener(UpdateEventListener listener) {
             if (workspace == null) {
                 versionUpdateListener = listener;
+                if (journal instanceof AbstractJournal &&
+                        versionUpdateListener instanceof InternalVersionManagerImpl) {
+                    ((AbstractJournal) journal).setInternalVersionManager(
+                            (InternalVersionManagerImpl) versionUpdateListener);
+                }
             } else {
                 wspUpdateListeners.remove(workspace);
                 if (listener != null) {

Modified: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java?rev=1069811&r1=1069810&r2=1069811&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java
Fri Feb 11 14:28:09 2011
@@ -21,6 +21,8 @@ import java.io.InputStream;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.jackrabbit.core.version.InternalVersionManagerImpl;
+import org.apache.jackrabbit.core.version.VersioningLock;
 import org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver;
@@ -86,6 +88,11 @@ public abstract class AbstractJournal im
     private File repHome;
 
     /**
+     * Internal version manager.
+     */
+    private InternalVersionManagerImpl internalVersionManager;
+
+    /**
      * {@inheritDoc}
      */
     public void init(String id, NamespaceResolver resolver) throws JournalException {
@@ -176,6 +183,20 @@ public abstract class AbstractJournal im
      * {@inheritDoc}
      */
     public void sync() throws JournalException {
+        if (internalVersionManager != null) {
+            VersioningLock.ReadLock lock =
+                internalVersionManager.acquireReadLock();
+            try {
+                internalSync();
+            } finally {
+                lock.release();
+            }
+        } else {
+            internalSync();
+        }
+    }
+
+    private void internalSync() throws JournalException {
         try {
             rwLock.readLock().acquire();
         } catch (InterruptedException e) {
@@ -237,6 +258,20 @@ public abstract class AbstractJournal im
      * @throws JournalException if an error occurs
      */
     public void lockAndSync() throws JournalException {
+        if (internalVersionManager != null) {
+            VersioningLock.ReadLock lock =
+                internalVersionManager.acquireReadLock();
+            try {
+                internalLockAndSync();
+            } finally {
+                lock.release();
+            }
+        } else {
+            internalLockAndSync();
+        }
+    }
+
+    private void internalLockAndSync() throws JournalException {
         try {
             rwLock.writeLock().acquire();
         } catch (InterruptedException e) {
@@ -354,6 +389,13 @@ public abstract class AbstractJournal im
     }
 
     /**
+     * Set the version manager.
+     */
+    public void setInternalVersionManager(InternalVersionManagerImpl internalVersionManager)
{
+        this.internalVersionManager = internalVersionManager;
+    }
+
+    /**
      * Return the repository home.
      *
      * @return the repository home

Modified: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java?rev=1069811&r1=1069810&r2=1069811&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
Fri Feb 11 14:28:09 2011
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.core.version;
 
 import org.apache.jackrabbit.core.state.ChildNodeEntry;
-import org.apache.jackrabbit.core.state.ISMLocking.ReadLock;
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.id.NodeId;
 import org.apache.jackrabbit.spi.Name;
@@ -139,7 +138,7 @@ class InternalVersionImpl extends Intern
      * {@inheritDoc}
      */
     public InternalVersion[] getSuccessors() {
-        ReadLock lock = vMgr.acquireReadLock();
+        VersioningLock.ReadLock lock = vMgr.acquireReadLock();
         try {
             InternalValue[] values = node.getPropertyValues(NameConstants.JCR_SUCCESSORS);
             if (values != null) {

Modified: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerBase.java?rev=1069811&r1=1069810&r2=1069811&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerBase.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerBase.java
Fri Feb 11 14:28:09 2011
@@ -26,9 +26,6 @@ import javax.jcr.version.VersionExceptio
 
 import org.apache.jackrabbit.core.id.NodeId;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
-import org.apache.jackrabbit.core.state.DefaultISMLocking;
-import org.apache.jackrabbit.core.state.ISMLocking.ReadLock;
-import org.apache.jackrabbit.core.state.ISMLocking.WriteLock;
 import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.state.LocalItemStateManager;
 import org.apache.jackrabbit.core.state.NodeReferences;
@@ -70,7 +67,7 @@ abstract class InternalVersionManagerBas
     /**
      * the lock on this version manager
      */
-    private final DefaultISMLocking rwLock = new DefaultISMLocking();
+    private final VersioningLock rwLock = new VersioningLock();
 
     protected InternalVersionManagerBase(NodeTypeRegistry ntReg,
                                          NodeId historiesId,
@@ -135,7 +132,7 @@ abstract class InternalVersionManagerBas
      */
     public InternalVersionHistory getVersionHistoryOfNode(NodeId id)
             throws RepositoryException {
-        ReadLock lock = acquireReadLock();
+        VersioningLock.ReadLock lock = acquireReadLock();
         try {
             String uuid = id.toString();
             Name name = getName(uuid);
@@ -172,10 +169,10 @@ abstract class InternalVersionManagerBas
      * Acquires the write lock on this version manager.
      * @return returns the write lock
      */
-    protected WriteLock acquireWriteLock() {
+    protected VersioningLock.WriteLock acquireWriteLock() {
         while (true) {
             try {
-                return rwLock.acquireWriteLock(null);
+                return rwLock.acquireWriteLock();
             } catch (InterruptedException e) {
                 // ignore
             }
@@ -186,10 +183,10 @@ abstract class InternalVersionManagerBas
      * acquires the read lock on this version manager.
      * @return returns the read lock
      */
-    protected ReadLock acquireReadLock() {
+    public VersioningLock.ReadLock acquireReadLock() {
         while (true) {
             try {
-                return rwLock.acquireReadLock(null);
+                return rwLock.acquireReadLock();
             } catch (InterruptedException e) {
                 // ignore
             }
@@ -221,9 +218,9 @@ abstract class InternalVersionManagerBas
          */
         private boolean success = false;
 
-        private final WriteLock lock;
+        private final VersioningLock.WriteLock lock;
 
-        public WriteOperation(WriteLock lock) {
+        public WriteOperation(VersioningLock.WriteLock lock) {
             this.lock = lock;
         }
 
@@ -279,7 +276,7 @@ abstract class InternalVersionManagerBas
      */
     private WriteOperation startWriteOperation() throws RepositoryException {
         boolean success = false;
-        WriteLock lock = acquireWriteLock();
+        VersioningLock.WriteLock lock = acquireWriteLock();
         try {
             stateMgr.edit();
             success = true;
@@ -301,7 +298,7 @@ abstract class InternalVersionManagerBas
             throws RepositoryException {
         VersionHistoryInfo info = null;
 
-        ReadLock lock = acquireReadLock();
+        VersioningLock.ReadLock lock = acquireReadLock();
         try {
             String uuid = node.getNodeId().toString();
             Name name = getName(uuid);

Modified: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java?rev=1069811&r1=1069810&r2=1069811&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
Fri Feb 11 14:28:09 2011
@@ -44,7 +44,6 @@ import org.apache.jackrabbit.core.observ
 import org.apache.jackrabbit.core.persistence.PersistenceManager;
 import org.apache.jackrabbit.core.state.ChangeLog;
 import org.apache.jackrabbit.core.state.ISMLocking;
-import org.apache.jackrabbit.core.state.ISMLocking.ReadLock;
 import org.apache.jackrabbit.core.state.ItemState;
 import org.apache.jackrabbit.core.state.ItemStateCacheFactory;
 import org.apache.jackrabbit.core.state.ItemStateException;
@@ -305,7 +304,7 @@ public class InternalVersionManagerImpl 
      * {@inheritDoc}
      */
     public boolean hasItem(NodeId id) {
-        ReadLock lock = acquireReadLock();
+        VersioningLock.ReadLock lock = acquireReadLock();
         try {
             return stateMgr.hasItemState(id);
         } finally {
@@ -325,7 +324,7 @@ public class InternalVersionManagerImpl 
         if (id.equals(activitiesId)) {
             return null;
         }
-        ReadLock lock = acquireReadLock();
+        VersioningLock.ReadLock lock = acquireReadLock();
         try {
             synchronized (versionItems) {
                 InternalVersionItem item = versionItems.get(id);
@@ -479,7 +478,7 @@ public class InternalVersionManagerImpl 
      * @param items items updated
      */
     public void itemsUpdated(Collection<InternalVersionItem> items) {
-        ReadLock lock = acquireReadLock();
+        VersioningLock.ReadLock lock = acquireReadLock();
         try {
             synchronized (versionItems) {
                 for (InternalVersionItem item : items) {
@@ -517,7 +516,7 @@ public class InternalVersionManagerImpl 
      */
     protected void itemDiscarded(InternalVersionItem item) {
         // evict removed item from cache
-        ReadLock lock = acquireReadLock();
+        VersioningLock.ReadLock lock = acquireReadLock();
         try {
             versionItems.remove(item.getId());
         } finally {
@@ -615,7 +614,7 @@ public class InternalVersionManagerImpl 
      */
     public void stateDestroyed(ItemState destroyed) {
         // evict removed item from cache
-        ReadLock lock = acquireReadLock();
+        VersioningLock.ReadLock lock = acquireReadLock();
         try {
             versionItems.remove(destroyed.getId());
         } finally {

Modified: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java?rev=1069811&r1=1069810&r2=1069811&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java
Fri Feb 11 14:28:09 2011
@@ -34,8 +34,6 @@ import org.apache.jackrabbit.core.nodety
 import org.apache.jackrabbit.core.observation.EventStateCollection;
 import org.apache.jackrabbit.core.observation.EventStateCollectionFactory;
 import org.apache.jackrabbit.core.state.ChangeLog;
-import org.apache.jackrabbit.core.state.ISMLocking.ReadLock;
-import org.apache.jackrabbit.core.state.ISMLocking.WriteLock;
 import org.apache.jackrabbit.core.state.ItemState;
 import org.apache.jackrabbit.core.state.ItemStateCacheFactory;
 import org.apache.jackrabbit.core.state.ItemStateException;
@@ -91,7 +89,7 @@ public class InternalXAVersionManager ex
     /**
      * The global write lock on the version manager.
      */
-    private WriteLock vmgrLock;
+    private VersioningLock.WriteLock vmgrLock;
 
     /**
      * Persistent root node of the version histories.
@@ -724,7 +722,7 @@ public class InternalXAVersionManager ex
      */
     private InternalVersionHistoryImpl makeLocalCopy(InternalVersionHistoryImpl history)
             throws RepositoryException {
-        ReadLock lock = acquireReadLock();
+        VersioningLock.ReadLock lock = acquireReadLock();
         try {
             NodeState state = (NodeState) stateMgr.getItemState(history.getId());
             NodeStateEx stateEx = new NodeStateEx(stateMgr, ntReg, state, null);
@@ -746,7 +744,7 @@ public class InternalXAVersionManager ex
      */
     private InternalActivityImpl makeLocalCopy(InternalActivityImpl act)
             throws RepositoryException {
-        ReadLock lock = acquireReadLock();
+        VersioningLock.ReadLock lock = acquireReadLock();
         try {
             NodeState state = (NodeState) stateMgr.getItemState(act.getId());
             NodeStateEx stateEx = new NodeStateEx(stateMgr, ntReg, state, null);

Modified: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplBase.java?rev=1069811&r1=1069810&r2=1069811&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplBase.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplBase.java
Fri Feb 11 14:28:09 2011
@@ -34,8 +34,6 @@ import org.apache.jackrabbit.core.NodeIm
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.id.NodeId;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
-import org.apache.jackrabbit.core.state.DefaultISMLocking;
-import org.apache.jackrabbit.core.state.ISMLocking;
 import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.state.LocalItemStateManager;
 import org.apache.jackrabbit.core.state.UpdatableItemStateManager;
@@ -87,7 +85,7 @@ abstract public class VersionManagerImpl
     /**
      * the lock on this version manager
      */
-    private final DefaultISMLocking rwLock = new DefaultISMLocking();
+    private final VersioningLock rwLock = new VersioningLock();
 
     /**
      * the node id of the current activity
@@ -447,9 +445,9 @@ abstract public class VersionManagerImpl
          */
         private boolean success = false;
 
-        private final ISMLocking.WriteLock lock;
+        private final VersioningLock.WriteLock lock;
 
-        public WriteOperation(ISMLocking.WriteLock lock) {
+        public WriteOperation(VersioningLock.WriteLock lock) {
             this.lock = lock;
         }
 
@@ -485,10 +483,10 @@ abstract public class VersionManagerImpl
      * Acquires the write lock on this version manager.
      * @return returns the write lock
      */
-    protected ISMLocking.WriteLock acquireWriteLock() {
+    protected VersioningLock.WriteLock acquireWriteLock() {
         while (true) {
             try {
-                return rwLock.acquireWriteLock(null);
+                return rwLock.acquireWriteLock();
             } catch (InterruptedException e) {
                 // ignore
             }
@@ -499,10 +497,10 @@ abstract public class VersionManagerImpl
      * acquires the read lock on this version manager.
      * @return returns the read lock
      */
-    protected ISMLocking.ReadLock acquireReadLock() {
+    protected VersioningLock.ReadLock acquireReadLock() {
         while (true) {
             try {
-                return rwLock.acquireReadLock(null);
+                return rwLock.acquireReadLock();
             } catch (InterruptedException e) {
                 // ignore
             }
@@ -534,7 +532,7 @@ abstract public class VersionManagerImpl
      */
     public WriteOperation startWriteOperation() throws RepositoryException {
         boolean success = false;
-        ISMLocking.WriteLock lock = acquireWriteLock();
+        VersioningLock.WriteLock lock = acquireWriteLock();
         try {
             stateMgr.edit();
             success = true;

Copied: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java
(from r1065610, jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java)
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java?p2=jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java&p1=jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java&r1=1065610&r2=1069811&rev=1069811&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java
Fri Feb 11 14:28:09 2011
@@ -32,7 +32,7 @@ import EDU.oswego.cs.dl.util.concurrent.
  * to be re-entered not just by a thread that's already holding the lock but
  * by any thread within the same transaction.
  */
-class VersioningLock {
+public class VersioningLock {
 
     /**
      * The internal read-write lock.
@@ -127,7 +127,7 @@ class VersioningLock {
 
         /**
          * {@inheritDoc}
-         */  
+         */
         protected synchronized boolean startWrite() {
             Xid currentXid = TransactionContext.getCurrentXid();
             if (activeXid != null && isSameGlobalTx(currentXid)) { // already held;
re-acquire



Mime
View raw message