karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [1/2] karaf git commit: [KARAF-4839] Infinite System bundle restart on feature deployment
Date Thu, 01 Dec 2016 09:19:11 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-4.0.x 68f31c09f -> 6237f43e1


[KARAF-4839] Infinite System bundle restart on feature deployment

Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/6237f43e
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/6237f43e
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/6237f43e

Branch: refs/heads/karaf-4.0.x
Commit: 6237f43e1523e629883cfd4713be4473a35d16e5
Parents: 1369d9f
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Thu Dec 1 10:18:40 2016 +0100
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Thu Dec 1 10:19:05 2016 +0100

----------------------------------------------------------------------
 .../karaf/deployer/features/FeatureDeploymentListener.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/6237f43e/deployer/features/src/main/java/org/apache/karaf/deployer/features/FeatureDeploymentListener.java
----------------------------------------------------------------------
diff --git a/deployer/features/src/main/java/org/apache/karaf/deployer/features/FeatureDeploymentListener.java
b/deployer/features/src/main/java/org/apache/karaf/deployer/features/FeatureDeploymentListener.java
index 5a82469..2220b38 100644
--- a/deployer/features/src/main/java/org/apache/karaf/deployer/features/FeatureDeploymentListener.java
+++ b/deployer/features/src/main/java/org/apache/karaf/deployer/features/FeatureDeploymentListener.java
@@ -212,10 +212,14 @@ public class FeatureDeploymentListener implements ArtifactUrlTransformer,
Bundle
                                     Set<String> autoInstallFeatures = new HashSet<String>();
                                     for(Feature feature:features) {
                                         if(feature.getInstall() != null && feature.getInstall().equals(Feature.DEFAULT_INSTALL_MODE)){
-                                            autoInstallFeatures.add(feature.getId());
+                                            if (!featuresService.isInstalled(feature)) {
+                                                autoInstallFeatures.add(feature.getId());
+                                            }
                                         }
                                     }
-                                    featuresService.installFeatures(autoInstallFeatures,
EnumSet.noneOf(FeaturesService.Option.class));
+                                    if (!autoInstallFeatures.isEmpty()) {
+                                        featuresService.installFeatures(autoInstallFeatures,
EnumSet.noneOf(FeaturesService.Option.class));
+                                    }
                                 } else {
                                     //remove older out-of-data feature repo
                                     if (repo.getURI().toString().contains(FEATURE_PATH))
{


Mime
View raw message