felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r805479 - /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
Date Tue, 18 Aug 2009 16:20:41 GMT
Author: gnodet
Date: Tue Aug 18 16:20:41 2009
New Revision: 805479

URL: http://svn.apache.org/viewvc?rev=805479&view=rev
Log:
FELIX-938: fileinstall try to start too many bundles

Modified:
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java?rev=805479&r1=805478&r2=805479&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
Tue Aug 18 16:20:41 2009
@@ -421,18 +421,15 @@
             refresh();
         }
 
-        // Try to start all the bundles that we could not start last time.
-        // Make a copy, because start() changes the underlying collection
-        start(new HashSet(startupFailures));
-
-        if (startBundles
-            && ((uninstalledBundles.size() > 0)
-                || (updatedBundles.size() > 0)
-                || (installedBundles.size() > 0)))
-        {
-            // Something has changed in the system, so
-            // try to start all the bundles.
-            startAllBundles();
+        if (startBundles)
+        {
+            // Try to start all the bundles that we could not start last time.
+            // Make a copy, because start() changes the underlying collection
+            start(new HashSet(startupFailures));
+            // Start updated bundles.
+            start(updatedBundles);
+            // Start newly installed bundles.
+            start(installedBundles);
         }
     }
 
@@ -869,16 +866,4 @@
         }
     }
 
-    /**
-     * Start all bundles that we are currently managing.
-     */
-    private void startAllBundles()
-    {
-        for (Iterator jars = currentManagedBundles.values().iterator(); jars.hasNext(); )
-        {
-            Jar jar = (Jar) jars.next();
-            Bundle bundle = context.getBundle(jar.getBundleId());
-            start(bundle);
-        }
-    }
 }



Mime
View raw message