karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-4764] Add ability to configure RMI Registry locate and create flags
Date Sat, 15 Oct 2016 09:25:13 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-4.0.x 315e01cdf -> baf36fe3c


[KARAF-4764] Add ability to configure RMI Registry locate and create flags


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

Branch: refs/heads/karaf-4.0.x
Commit: baf36fe3c6460d796800e49b1d59d7b4a1ce4ada
Parents: 315e01c
Author: Dmitry Konstantinov <konstantinov@netcracker.com>
Authored: Wed Oct 12 17:36:46 2016 +0300
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Sat Oct 15 10:54:40 2016 +0200

----------------------------------------------------------------------
 .../org/apache/karaf/management/internal/Activator.java     | 9 ++++++---
 .../main/resources/OSGI-INF/metatype/metatype.properties    | 9 +++++++++
 .../src/main/resources/OSGI-INF/metatype/metatype.xml       | 6 ++++++
 3 files changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/baf36fe3/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java
----------------------------------------------------------------------
diff --git a/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java
b/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java
index ae6db00..41d6798 100644
--- a/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java
+++ b/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java
@@ -88,20 +88,23 @@ public class Activator extends BaseActivator implements ManagedService
{
         String keyStore = getString("keyStore", "karaf.ks");
         String keyAlias = getString("keyAlias", "karaf");
         String trustStore = getString("trustStore", "karaf.ts");
+        boolean createRmiRegistry = getBoolean("createRmiRegistry", true);
+        boolean locateRmiRegistry = getBoolean("locateRmiRegistry", true);
+        boolean locateExistingMBeanServerIfPossible = getBoolean("locateExistingMBeanServerIfPossible",
true);
 
         KarafMBeanServerGuard guard = new KarafMBeanServerGuard();
         guard.setConfigAdmin(configurationAdmin);
 
         rmiRegistryFactory = new RmiRegistryFactory();
-        rmiRegistryFactory.setCreate(true);
-        rmiRegistryFactory.setLocate(true);
+        rmiRegistryFactory.setCreate(createRmiRegistry);
+        rmiRegistryFactory.setLocate(locateRmiRegistry);
         rmiRegistryFactory.setHost(rmiRegistryHost);
         rmiRegistryFactory.setPort(rmiRegistryPort);
         rmiRegistryFactory.setBundleContext(bundleContext);
         rmiRegistryFactory.init();
 
         mbeanServerFactory = new MBeanServerFactory();
-        mbeanServerFactory.setLocateExistingServerIfPossible(true);
+        mbeanServerFactory.setLocateExistingServerIfPossible(locateExistingMBeanServerIfPossible);
         mbeanServerFactory.init();
 
         MBeanServer mbeanServer = mbeanServerFactory.getServer();

http://git-wip-us.apache.org/repos/asf/karaf/blob/baf36fe3/management/server/src/main/resources/OSGI-INF/metatype/metatype.properties
----------------------------------------------------------------------
diff --git a/management/server/src/main/resources/OSGI-INF/metatype/metatype.properties b/management/server/src/main/resources/OSGI-INF/metatype/metatype.properties
index 24c5742..806a2a5 100644
--- a/management/server/src/main/resources/OSGI-INF/metatype/metatype.properties
+++ b/management/server/src/main/resources/OSGI-INF/metatype/metatype.properties
@@ -36,6 +36,15 @@ rmiServerHost.description = host of the server for the exported RMI objects.
Bla
 rmiServerPort.name = RMI Server Port
 rmiServerPort.description = port of the server for the exported RMI objects
 
+createRmiRegistry.name = Create RMI Registry
+createRmiRegistry.description = whether an embedded RMI Registry should be created on startup
+
+locateRmiRegistry.name = Locate RMI Registry
+locateRmiRegistry.description = whether an existing RMI Registry should be located on startup
+
+locateExistingMBeanServerIfPossible.name = Locate Existing MBean Server If Possible
+locateExistingMBeanServerIfPossible.description = whether an existing MBean Server should
be located on startup
+
 jmxRealm.name = Realm
 jmxRealm.description = name of the JAAS realm used for authentication
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/baf36fe3/management/server/src/main/resources/OSGI-INF/metatype/metatype.xml
----------------------------------------------------------------------
diff --git a/management/server/src/main/resources/OSGI-INF/metatype/metatype.xml b/management/server/src/main/resources/OSGI-INF/metatype/metatype.xml
index 9c73b30..a66a428 100644
--- a/management/server/src/main/resources/OSGI-INF/metatype/metatype.xml
+++ b/management/server/src/main/resources/OSGI-INF/metatype/metatype.xml
@@ -27,6 +27,12 @@
             description="%rmiServerHost.description"/>
         <AD id="rmiServerPort" type="Integer" default="44444" name="%rmiServerPort.name"
             description="%rmiServerPort.description"/>
+        <AD id="createRmiRegistry" type="Boolean" default="true" name="%createRmiRegistry.name"
+            description="%createRmiRegistry.description"/>
+        <AD id="locateRmiRegistry" type="Boolean" default="true" name="%locateRmiRegistry.name"
+            description="%locateRmiRegistry.description"/>
+        <AD id="locateExistingMBeanServerIfPossible" type="Boolean" default="true" name="%locateExistingMBeanServerIfPossible.name"
+            description="%locateExistingMBeanServerIfPossible.description"/>
         <AD id="jmxRealm" type="String" default="karaf" name="%jmxRealm.name"
             description="%jmxRealm.description"/>
         <AD id="serviceUrl" type="String" default="service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/jmxrmi"
name="%serviceUrl.name"


Mime
View raw message