karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fla...@apache.org
Subject karaf git commit: [KARAF-5067] Add option to prevent RegionDigraph MBean of features service
Date Sun, 26 Mar 2017 18:09:14 GMT
Repository: karaf
Updated Branches:
  refs/heads/master c97717162 -> 9f945fa7c


[KARAF-5067] Add option to prevent RegionDigraph MBean of features service


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

Branch: refs/heads/master
Commit: 9f945fa7c75d35479b9ea06e542c46576583abd2
Parents: c977171
Author: Fabian Lange <lange.fabian@gmail.com>
Authored: Sun Mar 26 20:07:42 2017 +0200
Committer: Fabian Lange <lange.fabian@gmail.com>
Committed: Sun Mar 26 20:08:21 2017 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/karaf/features/FeaturesService.java   | 1 +
 .../org/apache/karaf/features/internal/osgi/Activator.java     | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/9f945fa7/features/core/src/main/java/org/apache/karaf/features/FeaturesService.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/FeaturesService.java b/features/core/src/main/java/org/apache/karaf/features/FeaturesService.java
index ad34ec8..c7c932a 100644
--- a/features/core/src/main/java/org/apache/karaf/features/FeaturesService.java
+++ b/features/core/src/main/java/org/apache/karaf/features/FeaturesService.java
@@ -48,6 +48,7 @@ public interface FeaturesService {
     long DEFAULT_REPOSITORY_EXPIRATION = 60000; // 1 minute
 
     boolean DEFAULT_CONFIG_CFG_STORE = true;
+    boolean DEFAULT_DIGRAPH_MBEAN = true;
 
     enum Option {
         NoFailOnFeatureNotFound,

http://git-wip-us.apache.org/repos/asf/karaf/blob/9f945fa7/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
b/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
index 7956247..ea573bd 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
@@ -134,9 +134,11 @@ public class Activator extends BaseActivator {
         register(org.osgi.framework.hooks.service.EventHook.class, dg.getServiceEventHook());
         register(RegionDigraph.class, dg);
         register(RegionDigraphPersistence.class, this::doPersistRegionDigraph);
-        StandardManageableRegionDigraph dgmb = digraphMBean = new StandardManageableRegionDigraph(dg,
"org.apache.karaf", bundleContext);
-        dgmb.registerMBean();
 
+        if (getBoolean("digraphMBean", FeaturesService.DEFAULT_DIGRAPH_MBEAN)) {
+            StandardManageableRegionDigraph dgmb = digraphMBean = new StandardManageableRegionDigraph(dg,
"org.apache.karaf", bundleContext);
+            dgmb.registerMBean();
+        }
 
         FeatureFinder featureFinder = new FeatureFinder();
         Hashtable<String, Object> props = new Hashtable<>();


Mime
View raw message