karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject karaf git commit: [KARAF-4839] Infinite System bundle restart on feature deployment
Date Thu, 01 Dec 2016 09:19:32 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 34908fb1d -> 0dfaab74b


[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/0dfaab74
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/0dfaab74
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/0dfaab74

Branch: refs/heads/master
Commit: 0dfaab74b21055bda6c1026063e482853481d04f
Parents: 34908fb
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:25 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/0dfaab74/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