incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r813478 - /sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerThread.java
Date Thu, 10 Sep 2009 15:45:24 GMT
Author: bdelacretaz
Date: Thu Sep 10 15:45:24 2009
New Revision: 813478

URL: http://svn.apache.org/viewvc?rev=813478&view=rev
Log:
SLING-1078 - do not go idle if retries are scheduled

Modified:
    sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerThread.java

Modified: sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerThread.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerThread.java?rev=813478&r1=813477&r2=813478&view=diff
==============================================================================
--- sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerThread.java
(original)
+++ sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerThread.java
Thu Sep 10 15:45:24 2009
@@ -55,6 +55,7 @@
     private final Set<String> newResourcesSchemes = new HashSet<String>();
     private final Set<String> urlsToRemove = new HashSet<String>();
     private boolean active = true;
+    private boolean retriesScheduled;
     
     /** Group our RegisteredResource by OSGi entity */ 
     private Map<String, SortedSet<RegisteredResource>>registeredResources = 
@@ -85,7 +86,7 @@
             	mergeNewResources();
             	computeTasks();
             	
-            	if(tasks.isEmpty()) {
+            	if(tasks.isEmpty() && !retriesScheduled) {
             	    // No tasks to execute - wait until new resources are
             	    // registered
             	    cleanupInstallableResources();
@@ -104,6 +105,7 @@
             	    continue;
             	}
             	
+            	retriesScheduled = false;
                 executeTasks();
                 
                 // Some integration tests depend on this delay, make sure to
@@ -386,6 +388,7 @@
     		}
             synchronized (newResources) {
                 newResources.notify();
+                retriesScheduled = true;
             }
     	}
     }



Mime
View raw message