jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r637106 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
Date Fri, 14 Mar 2008 14:18:44 GMT
Author: jukka
Date: Fri Mar 14 07:18:38 2008
New Revision: 637106

URL: http://svn.apache.org/viewvc?rev=637106&view=rev
Log:
JCR-1461: Deadlock on concurrent commit/checkin operations
    - Applied Marcel's patch

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java?rev=637106&r1=637105&r2=637106&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
Fri Mar 14 07:18:38 2008
@@ -380,11 +380,15 @@
      * @throws RepositoryException if an error occurs
      */
     public AbstractLockInfo getLockInfo(NodeId id) throws RepositoryException {
-        acquire();
-
+        Path path;
         try {
-            Path path = getPath(id);
+            path = getPath(id);
+        } catch (ItemNotFoundException e) {
+            return null;
+        }
 
+        acquire();
+        try {
             PathMap.Element element = lockMap.map(path, false);
             AbstractLockInfo info = (AbstractLockInfo) element.get();
             if (info != null) {
@@ -392,8 +396,6 @@
                     return info;
                 }
             }
-            return null;
-        } catch (ItemNotFoundException e) {
             return null;
         } finally {
             release();



Mime
View raw message