You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2020/02/07 18:14:41 UTC

[cxf] branch 3.3.x-fixes updated: CXF-8209 - Add a way of configuring the RMI environment in InstrumentationManagerImpl

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

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/3.3.x-fixes by this push:
     new 42d9390  CXF-8209 - Add a way of configuring the RMI environment in InstrumentationManagerImpl
42d9390 is described below

commit 42d939077830c9e78221a472ca40beea9caa135e
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Feb 7 18:13:21 2020 +0000

    CXF-8209 - Add a way of configuring the RMI environment in InstrumentationManagerImpl
    
    (cherry picked from commit 33c01f3c9128d4954c5cb2fa8f580721fa4af7c1)
---
 .../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) {