You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gg...@apache.org on 2017/12/11 13:28:15 UTC

[karaf] 01/02: [KARAF-5528] Stop refreshed bundles together with updated and deleted ones

This is an automated email from the ASF dual-hosted git repository.

ggrzybek pushed a commit to branch KARAF-5528
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit 367d6c9e586a288966283de29f57435c4c63030c
Author: Grzegorz Grzybek <gr...@gmail.com>
AuthorDate: Mon Dec 11 13:53:48 2017 +0100

    [KARAF-5528] Stop refreshed bundles together with updated and deleted ones
---
 .../java/org/apache/karaf/features/internal/service/Deployer.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
index 48eed92..4f54f28 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
@@ -559,7 +559,7 @@ public class Deployer {
         //
         // Execute deployment
         //
-        // #1: stop bundles that needs to be updated or uninstalled in order
+        // #1: stop bundles that needs to be updated or uninstalled or refreshed in order
         // #2: uninstall needed bundles
         // #3: update regions
         // #4: update bundles
@@ -633,6 +633,11 @@ public class Deployer {
             toStop.addAll(regionDeployment.toUpdate.keySet());
             toStop.addAll(regionDeployment.toDelete);
         }
+        if (!noRefresh) {
+            Set<Bundle> toRefreshToStopEarly = new HashSet<>(toRefresh.keySet());
+            toRefreshToStopEarly.remove(dstate.serviceBundle);
+            toStop.addAll(toRefreshToStopEarly);
+        }
         removeFragmentsAndBundlesInState(toStop, UNINSTALLED | RESOLVED | STOPPING | STARTING);
         if (!toStop.isEmpty()) {
             print("Stopping bundles:", verbose);

-- 
To stop receiving notification emails like this one, please contact
"commits@karaf.apache.org" <co...@karaf.apache.org>.