incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r919450 - /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
Date Fri, 05 Mar 2010 15:28:06 GMT
Author: cziegeler
Date: Fri Mar  5 15:28:06 2010
New Revision: 919450

URL: http://svn.apache.org/viewvc?rev=919450&view=rev
Log:
SLING-1426 : Spurious wakeups are not handled correctly

Modified:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java?rev=919450&r1=919449&r2=919450&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
Fri Mar  5 15:28:06 2010
@@ -1227,15 +1227,15 @@
      * @see org.apache.sling.event.impl.job.JobStatusNotifier#sendAcknowledge(org.osgi.service.event.Event,
java.lang.String)
      */
     public boolean sendAcknowledge(Event job, String eventNodePath) {
+        final Object ack;
         synchronized ( this.processingEventsList ) {
-            // if the event is still in the processing list, we confirm the ack
-            final Object ack = this.processingEventsList.remove(eventNodePath);
-            if ( ack != null ) {
-                this.sendNotification(EventUtil.TOPIC_JOB_STARTED, job);
-            }
-            return ack != null;
+            ack = this.processingEventsList.remove(eventNodePath);
         }
-
+        // if the event is still in the processing list, we confirm the ack
+        if ( ack != null ) {
+            this.sendNotification(EventUtil.TOPIC_JOB_STARTED, job);
+        }
+        return ack != null;
     }
 
     public static final class RescheduleInfo {



Mime
View raw message