felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r690574 - /felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
Date Sat, 30 Aug 2008 20:16:32 GMT
Author: fmeschbe
Date: Sat Aug 30 13:16:31 2008
New Revision: 690574

URL: http://svn.apache.org/viewvc?rev=690574&view=rev
Log:
FELIX-701 Stop running bundles before updating it and start only
when all bundles have been installed/updated to prevent resolution
issues when updating running bundles

Modified:
    felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java

Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java?rev=690574&r1=690573&r2=690574&view=diff
==============================================================================
--- felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
(original)
+++ felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
Sat Aug 30 13:16:31 2008
@@ -485,11 +485,21 @@
                     // Update the installed bundle.
                     try
                     {
+                        // stop the bundle before updating to prevent
+                        // the bundle update from throwing due to not yet
+                        // resolved dependencies
+                        boolean doStartBundle = start;
+                        if (localResource.getBundle().getState() == Bundle.ACTIVE)
+                        {
+                            doStartBundle = true;
+                            localResource.getBundle().stop();
+                        }
+                        
                         localResource.getBundle().update(deployResources[i].getURL().openStream());
 
                         // If necessary, save the updated bundle to be
                         // started later.
-                        if (start)
+                        if (doStartBundle)
                         {
                             startList.add(localResource.getBundle());
                         }



Mime
View raw message