Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Minor
-
Resolution: Complete
-
Affects Version/s: None
-
Fix Version/s: 4.3 M1
-
Component/s: JMX Support
-
Labels:
-
Pull Request URL:
Description
Creates a new server by default (if no server attribute) - it should locate an existing server by default (new attribute needed) like the jmx namespace.
Since this is a behavior change (and there is a work-around - specify a server), deferring to 4.3.
Replace
else {
exporter.setServer(MBeanServerFactory.createMBeanServer());
}
with something like
else { MBeanServer located = JmxUtils.locateMBeanServer(); // if attributes.get("locateExisting") if (located != null) { exporter.setServer(located); } else { exporter.setServer(MBeanServerFactory.createMBeanServer()); } }