karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggrzy...@apache.org
Subject [karaf] 01/02: [KARAF-5528] Stop refreshed bundles together with updated and deleted ones
Date Mon, 11 Dec 2017 14:27:07 GMT
This is an automated email from the ASF dual-hosted git repository.

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

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

    [KARAF-5528] Stop refreshed bundles together with updated and deleted ones
    
    (cherry picked from commit 367d6c9e586a288966283de29f57435c4c63030c)
---
 .../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 8cfd439..c482e80 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
@@ -556,7 +556,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
@@ -630,6 +630,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);
         if (!toStop.isEmpty()) {
             print("Stopping bundles:", verbose);

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

Mime
View raw message