jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1156237 - /jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
Date Wed, 10 Aug 2011 15:47:21 GMT
Author: mduerig
Date: Wed Aug 10 15:47:21 2011
New Revision: 1156237

URL: http://svn.apache.org/viewvc?rev=1156237&view=rev
Log:
JCR-3046: Improve exception handling in observation (ChangePolling)

Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java?rev=1156237&r1=1156236&r2=1156237&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
Wed Aug 10 15:47:21 2011
@@ -797,7 +797,12 @@ public class WorkspaceManager
             // notify listener
             for (EventBundle eventBundle : eventBundles) {
                 for (InternalEventListener lstnr : lstnrs) {
-                    lstnr.onEvent(eventBundle);
+                    try {
+                        lstnr.onEvent(eventBundle);
+                    } catch (Exception e) {
+                        log.warn("Exception in event polling thread: " + e);
+                        log.debug("Dump:", e);
+                    }
                 }
             }
         } finally {
@@ -1203,9 +1208,6 @@ public class WorkspaceManager
                 } catch (InterruptedException e) {
                     // terminate
                     break;
-                } catch (Exception e) {
-                    log.warn("Exception in event polling thread: " + e);
-                    log.debug("Dump:", e);
                 }
             }
         }



Mime
View raw message