ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1340731 - /ace/trunk/ace-managementagent/src/main/java/org/apache/ace/managementagent/Activator.java
Date Sun, 20 May 2012 14:16:02 GMT
Author: bramk
Date: Sun May 20 14:16:02 2012
New Revision: 1340731

URL: http://svn.apache.org/viewvc?rev=1340731&view=rev
Log:
ACE-276 Don't stop activators that where not started

Modified:
    ace/trunk/ace-managementagent/src/main/java/org/apache/ace/managementagent/Activator.java

Modified: ace/trunk/ace-managementagent/src/main/java/org/apache/ace/managementagent/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-managementagent/src/main/java/org/apache/ace/managementagent/Activator.java?rev=1340731&r1=1340730&r2=1340731&view=diff
==============================================================================
--- ace/trunk/ace-managementagent/src/main/java/org/apache/ace/managementagent/Activator.java
(original)
+++ ace/trunk/ace-managementagent/src/main/java/org/apache/ace/managementagent/Activator.java
Sun May 20 14:16:02 2012
@@ -44,9 +44,16 @@ public class Activator extends Dependenc
      */
     @Override
     public void destroy(BundleContext context, DependencyManager manager) throws Exception
{
+        // ACE-276 same logic as init()
         for (int i = 0; i < m_activators.length; i++) {
             BundleActivator a = m_activators[i];
-            a.stop(context);
+            String packageName = a.getClass().getPackage().getName();
+            if (!"disabled".equals(System.getProperty(packageName))) {
+                a.stop(context);
+            }
+            else if (!m_quiet) {
+                System.out.println("Not stopping activator " + packageName + ".");
+            }
         }
     }
 



Mime
View raw message