You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by gn...@apache.org on 2013/03/07 15:23:52 UTC

svn commit: r1453890 - /aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java

Author: gnodet
Date: Thu Mar  7 14:23:52 2013
New Revision: 1453890

URL: http://svn.apache.org/r1453890
Log:
[ARIES-1025] Orderly shutdown is ineffective for containers using the ext/cm namespace

Modified:
    aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java

Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java?rev=1453890&r1=1453889&r2=1453890&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java (original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java Thu Mar  7 14:23:52 2013
@@ -174,9 +174,11 @@ public class BlueprintExtender implement
         Bundle bundle = event.getBundle();
         if (bundle.getState() != Bundle.ACTIVE && bundle.getState() != Bundle.STARTING) {
             // The bundle is not in STARTING or ACTIVE state anymore
-            // so destroy the context
-            destroyContainer(bundle);
-            return;
+            // so destroy the context.  Ignore our own bundle since it
+            // needs to kick the orderly shutdown and not unregister the namespaces.
+            if (bundle != this.context.getBundle()) {
+                destroyContainer(bundle);
+            }
         }
     }
 
@@ -202,8 +204,11 @@ public class BlueprintExtender implement
         }
         if (bundle.getState() != Bundle.ACTIVE && bundle.getState() != Bundle.STARTING) {
             // The bundle is not in STARTING or ACTIVE state anymore
-            // so destroy the context
-            destroyContainer(bundle);
+            // so destroy the context.  Ignore our own bundle since it
+            // needs to kick the orderly shutdown and not unregister the namespaces.
+            if (bundle != this.context.getBundle()) {
+                destroyContainer(bundle);
+            }
             return;
         }
         // Do not track bundles given we are stopping