You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2010/03/24 16:11:35 UTC

svn commit: r927082 - /jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java

Author: jukka
Date: Wed Mar 24 15:11:34 2010
New Revision: 927082

URL: http://svn.apache.org/viewvc?rev=927082&view=rev
Log:
JCRRMI-26: JSR-283 support

Clean up exceptions thrown by ServerLockManager

Modified:
    jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java

Modified: jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java?rev=927082&r1=927081&r2=927082&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java Wed Mar 24 15:11:34 2010
@@ -37,40 +37,72 @@ public class ServerLockManager extends S
     }
 
     public String[] getLockTokens() throws RepositoryException {
-        return manager.getLockTokens();
+        try {
+            return manager.getLockTokens();
+        } catch (RepositoryException e) {
+            throw getRepositoryException(e);
+        }
     }
 
     public void addLockToken(String lockToken) throws RepositoryException {
-        manager.addLockToken(lockToken);
+        try {
+            manager.addLockToken(lockToken);
+        } catch (RepositoryException e) {
+            throw getRepositoryException(e);
+        }
     }
 
     public void removeLockToken(String lockToken) throws RepositoryException {
-        manager.removeLockToken(lockToken);
+        try {
+            manager.removeLockToken(lockToken);
+        } catch (RepositoryException e) {
+            throw getRepositoryException(e);
+        }
     }
 
     public boolean isLocked(String absPath) throws RepositoryException {
-        return manager.isLocked(absPath);
+        try {
+            return manager.isLocked(absPath);
+        } catch (RepositoryException e) {
+            throw getRepositoryException(e);
+        }
     }
 
     public boolean holdsLock(String absPath) throws RepositoryException {
-        return manager.holdsLock(absPath);
+        try {
+            return manager.holdsLock(absPath);
+        } catch (RepositoryException e) {
+            throw getRepositoryException(e);
+        }
     }
 
     public RemoteLock getLock(String absPath)
             throws RepositoryException, RemoteException {
-        return getFactory().getRemoteLock(manager.getLock(absPath));
+        try {
+            return getFactory().getRemoteLock(manager.getLock(absPath));
+        } catch (RepositoryException e) {
+            throw getRepositoryException(e);
+        }
     }
 
     public RemoteLock lock(
             String absPath, boolean isDeep, boolean isSessionScoped,
             long timeoutHint, String ownerInfo)
             throws RepositoryException, RemoteException {
-        return getFactory().getRemoteLock(manager.lock(
-                absPath, isDeep, isSessionScoped, timeoutHint, ownerInfo));
+        try {
+            return getFactory().getRemoteLock(manager.lock(
+                    absPath, isDeep, isSessionScoped, timeoutHint, ownerInfo));
+        } catch (RepositoryException e) {
+            throw getRepositoryException(e);
+        }
     }
 
     public void unlock(String absPath) throws RepositoryException {
-        manager.unlock(absPath);
+        try {
+            manager.unlock(absPath);
+        } catch (RepositoryException e) {
+            throw getRepositoryException(e);
+        }
     }
 
 }