aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1453890 - /aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
Date Thu, 07 Mar 2013 14:23:52 GMT
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



Mime
View raw message