aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cwil...@apache.org
Subject svn commit: r1068963 - /aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
Date Wed, 09 Feb 2011 16:39:29 GMT
Author: cwilkin
Date: Wed Feb  9 16:39:29 2011
New Revision: 1068963

URL: http://svn.apache.org/viewvc?rev=1068963&view=rev
Log:
ARIES-559 : Temporarily back out start changes

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

Modified: 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/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java?rev=1068963&r1=1068962&r2=1068963&view=diff
==============================================================================
--- aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
(original)
+++ aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
Wed Feb  9 16:39:29 2011
@@ -161,8 +161,15 @@ public class BundleFrameworkManagerImpl 
     if (bundleFramework != null) {
       
       try {  
-        // Initialise the framework (this does not start anything)
-        bundleFramework.init();
+        boolean frameworkStarted = false;
+        try {
+          // Start the empty framework bundle
+          bundleFramework.start();
+          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
@@ -174,6 +181,9 @@ public class BundleFrameworkManagerImpl 
             bundleFramework.install(suggestion, app);
         }   
         
+        if (!frameworkStarted)
+          bundleFramework.start();
+        
       } catch (BundleException be) {
         bundleFramework.close();
         throw be;
@@ -219,10 +229,7 @@ public class BundleFrameworkManagerImpl 
             
       // Start all bundles inside the framework
       if (framework != null) // App Content
-      {
-        // Start the framework in case not already started
-        framework.start();
-        
+      {        
         for (Bundle bundle : framework.getBundles())
           framework.start(bundle);
         
@@ -242,8 +249,6 @@ public class BundleFrameworkManagerImpl 
         for (Bundle bundle : framework.getBundles())
           framework.stop(bundle);
         
-        // Stop the framework
-        framework.getFrameworkBundle().stop();
       }
       
       // Do not stop shared bundles



Mime
View raw message