[cxf] branch master updated: CXF-8209 - Add a way of configuring the RMI environment in InstrumentationManagerImpl

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[cxf] branch master updated: CXF-8209 - Add a way of configuring the RMI environment in InstrumentationManagerImpl

coheigea
Administrator
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 33c01f3  CXF-8209 - Add a way of configuring the RMI environment in InstrumentationManagerImpl
33c01f3 is described below

commit 33c01f3c9128d4954c5cb2fa8f580721fa4af7c1
Author: Colm O hEigeartaigh <[hidden email]>
AuthorDate: Fri Feb 7 18:13:21 2020 +0000

    CXF-8209 - Add a way of configuring the RMI environment in InstrumentationManagerImpl
---
 .../org/apache/cxf/management/jmx/InstrumentationManagerImpl.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java b/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
index 6b4d879..ee7f0a7 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
@@ -62,7 +62,7 @@ public class InstrumentationManagerImpl extends JMXConnectorPolicyType
     implements InstrumentationManager, BusLifeCycleListener {
     private static final Logger LOG = LogUtils.getL7dLogger(InstrumentationManagerImpl.class);
 
-    private static Map<String, String>mbeanServerIDMap = new HashMap<>();
+    private static Map<String, String> mbeanServerIDMap = new HashMap<>();
 
     private Bus bus;
     private MBServerConnectorFactory mcf;
@@ -70,6 +70,7 @@ public class InstrumentationManagerImpl extends JMXConnectorPolicyType
     private Set<ObjectName> busMBeans = new HashSet<>();
     private boolean connectFailed;
     private String persistentBusId;
+    private Map<String, ?> environment;
 
     /**
      * For backward compatibility, {@link #createMBServerConnectorFactory} is <code>true</code> by default.
@@ -126,6 +127,10 @@ public class InstrumentationManagerImpl extends JMXConnectorPolicyType
         usePlatformMBeanServer = flag;
     }
 
+    public void setEnvironment(Map<String, ?> env) {
+        environment = env;
+    }
+
     @Deprecated
     public void register() {
     }
@@ -169,6 +174,7 @@ public class InstrumentationManagerImpl extends JMXConnectorPolicyType
                 mcf.setThreaded(isThreaded());
                 mcf.setDaemon(isDaemon());
                 mcf.setServiceUrl(getJMXServiceURL());
+                mcf.setEnvironment(environment);
                 try {
                     mcf.createConnector();
                 } catch (IOException ex) {