jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r543780 - /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java
Date Sat, 02 Jun 2007 20:33:42 GMT
Author: jukka
Date: Sat Jun  2 13:33:42 2007
New Revision: 543780

URL: http://svn.apache.org/viewvc?view=rev&rev=543780
Log:
JCR-956: Added logging in proxy repository for cases when an exception can not be thrown.

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java?view=diff&rev=543780&r1=543779&r2=543780
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java
Sat Jun  2 13:33:42 2007
@@ -21,6 +21,8 @@
 import javax.jcr.Session;
 
 import org.apache.jackrabbit.commons.AbstractRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Repository that proxies all method calls to another repository.
@@ -30,6 +32,12 @@
 public class ProxyRepository extends AbstractRepository {
 
     /**
+     * Logger instance.
+     */
+    private static final Logger logger =
+        LoggerFactory.getLogger(ProxyRepository.class);
+
+    /**
      * Factory for accessing the proxied repository.
      */
     private final RepositoryFactory factory;
@@ -54,6 +62,7 @@
         try {
             return factory.getRepository().getDescriptorKeys();
         } catch (RepositoryException e) {
+            logger.warn("Unable to access proxied repository", e);
             return new String[0];
         }
     }
@@ -69,7 +78,8 @@
         try {
             return factory.getRepository().getDescriptor(key);
         } catch (RepositoryException e) {
-            return e.getMessage();
+            logger.warn("Unable to access proxied repository", e);
+            return null;
         }
     }
 



Mime
View raw message