[QFJ-182] JMX Connector object names are not unique Created: 22/May/07 Updated: 04/Jul/07 Resolved: 25/May/07 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | None |
Affects Version/s: | 1.1.0 |
Fix Version/s: | 1.2.0 |
Type: | Bug | Priority: | Default |
Reporter: | Thomas Hügel | Assignee: | Steve Bate |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Description |
Hello, the current implementation of ConnectorJMXExporter.java does only work if you dont use a second connector. The name "type=Connector,role=Initiator" is to generic because the second connector has allways the same name, the error would look like the following: 22.05.2007 17:49:24 org.quickfixj.jmx.mbean.connector.ConnectorJmxExporter export My approach was to add the name of the configFile in the JMXExporter.export() function, this is probably to simple in case that the configfiles are not in the same directory. Must be a better way. **** else if (connector instanceof AbstractSocketInitiator) { connectorAdmin = new SocketInitiatorAdmin((AbstractSocketInitiator) connector, sessionExporter); }else { throw new QFJException("Unknown connector type: " + connector.getClass().getName()); } //changed: ObjectName connectorName = getConnectorName(connector); mbeanServer.registerMBean(connectorAdmin, connectorName); } catch (Exception e) { log.error("Failed to export connector MBean", e); } } *** The jmx export im my code looks like jmxExporter = new JmxExporter(ManagementFactory.getPlatformMBeanServer()); instead of jmxExporter = new JmxExporter(ManagementFactory.getPlatformMBeanServer()); I checked with jconsole, works. Regards |