jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1537177 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
Date Wed, 30 Oct 2013 17:04:43 GMT
Author: mduerig
Date: Wed Oct 30 17:04:43 2013
New Revision: 1537177

URL: http://svn.apache.org/r1537177
Log:
OAK-1113: Immediate delivery of events from local commits
Unregister mbean outside of run method to avoid dead locking with stop call

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java?rev=1537177&r1=1537176&r2=1537177&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
Wed Oct 30 17:04:43 2013
@@ -116,6 +116,8 @@ public class ChangeProcessor {
             } catch (InterruptedException e) {
                 log.warn("Interruption while waiting for the observation thread to terminate",
e);
                 Thread.currentThread().interrupt();
+            } finally {
+                thread.dispose();
             }
         }
     }
@@ -157,16 +159,18 @@ public class ChangeProcessor {
                     }
                 }
             } catch (Exception e) {
-                log.debug("Error while dispatching observation events", e);
-            } finally {
-                mbean.unregister();
-                changeListener.dispose();
+                log.warn("Error while dispatching observation events", e);
             }
         }
 
         private ImmutableTree getTree(NodeState nodeState, String path) {
             return new ImmutableRoot(nodeState).getTree(path);
         }
+
+        void dispose() {
+            mbean.unregister();
+            changeListener.dispose();
+        }
     }
 
 }



Mime
View raw message