jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r539491 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Fri, 18 May 2007 15:02:06 GMT
Author: stefan
Date: Fri May 18 08:02:05 2007
New Revision: 539491

URL: http://svn.apache.org/viewvc?view=rev&rev=539491
Log:
JCR-912: OverlappingFileLockException with JRE 1.6

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?view=diff&rev=539491&r1=539490&r2=539491
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Fri May 18 08:02:05 2007
@@ -57,9 +57,7 @@
 import org.apache.jackrabbit.core.state.SharedItemStateManager;
 import org.apache.jackrabbit.core.version.VersionManager;
 import org.apache.jackrabbit.core.version.VersionManagerImpl;
-import org.apache.jackrabbit.name.NameFormat;
 import org.apache.jackrabbit.name.NamespaceResolver;
-import org.apache.jackrabbit.name.NoPrefixDeclaredException;
 import org.apache.jackrabbit.name.QName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -74,6 +72,7 @@
 import java.io.RandomAccessFile;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
+import java.nio.channels.OverlappingFileLockException;
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.util.Arrays;
@@ -418,6 +417,11 @@
         } catch (IOException e) {
             throw new RepositoryException(
                 "Unable to lock file at " + lock.getAbsolutePath(), e);
+        } catch (OverlappingFileLockException e) {
+            throw new RepositoryException(
+                    "The repository home at " + home.getAbsolutePath()
+                    + " appears to be in use since the file at "
+                    + lock.getAbsolutePath() + " is already locked by the current process.");
         }
         if (repLock == null) {
             throw new RepositoryException(



Mime
View raw message