incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cwil...@apache.org
Subject svn commit: r1036431 - /incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
Date Thu, 18 Nov 2010 12:20:06 GMT
Author: cwilkin
Date: Thu Nov 18 12:20:06 2010
New Revision: 1036431

URL: http://svn.apache.org/viewvc?rev=1036431&view=rev
Log:
ARIES-493 : Reinstate composite start logic

Modified:
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java

Modified: incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java?rev=1036431&r1=1036430&r2=1036431&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
(original)
+++ incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
Thu Nov 18 12:20:06 2010
@@ -29,10 +29,8 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 import java.util.Set;
 
-import org.apache.aries.application.Content;
 import org.apache.aries.application.DeploymentContent;
 import org.apache.aries.application.DeploymentMetadata;
 import org.apache.aries.application.management.AriesApplication;
@@ -45,12 +43,9 @@ import org.apache.aries.application.mana
 import org.apache.aries.application.management.spi.repository.ContextException;
 import org.apache.aries.application.management.spi.repository.BundleRepository.BundleSuggestion;
 import org.apache.aries.application.management.spi.update.UpdateStrategy;
-import org.apache.aries.application.runtime.framework.utils.EquinoxFrameworkUtils;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-import org.osgi.framework.Filter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -164,19 +159,29 @@ public class BundleFrameworkManagerImpl 
     // We should now have a bundleFramework
     if (bundleFramework != null) {
 
+      boolean frameworkStarted = false;
+      try {
+        // Start the empty framework bundle
+        bundleFramework.init();
+        frameworkStarted = true;
+      } catch (BundleException e) {
+        // This may fail if the framework bundle has exports but we will retry later
+      }
+
       /**
        * Install the bundles into the new framework
        */
-
+      
       List<Bundle> installedBundles = new ArrayList<Bundle>();
       BundleContext frameworkBundleContext = bundleFramework.getIsolatedBundleContext();
       if (frameworkBundleContext != null) {
         for (BundleSuggestion suggestion : bundlesToBeInstalled)
           installedBundles.add(bundleFramework.install(suggestion, app));
       }
-
+      
       // Finally, start the whole lot
-      bundleFramework.init();
+      if (!frameworkStarted)
+        bundleFramework.init();
     }
 
     LOGGER.debug(LOG_EXIT, "isolatedInstall", bundleFramework);



Mime
View raw message