Details
Description
Hello,
when exporting an jmx session with an session qualifier, the code in SessionJmxExporter.java, sets the property "qualifier" twice which causes the following exception:
22.05.2007 16:21:52 org.quickfixj.jmx.mbean.connector.ConnectorJmxExporter export
SCHWERWIEGEND: Failed to export connector MBean
javax.management.MalformedObjectNameException: key `qualifier' already defined
at javax.management.ObjectName.addProperty(ObjectName.java:664)
at javax.management.ObjectName.construct(ObjectName.java:559)
at javax.management.ObjectName.<init>(ObjectName.java:1304)
at javax.management.ObjectName.getInstance(ObjectName.java:1187)
at org.quickfixj.jmx.mbean.ObjectNameFactory.createName(ObjectNameFactory.java:37)
at org.quickfixj.jmx.mbean.session.SessionJmxExporter.createSessionName(SessionJmxExporter.java:50)
at org.quickfixj.jmx.mbean.session.SessionJmxExporter.export(SessionJmxExporter.java:24)
at org.quickfixj.jmx.mbean.connector.ConnectorJmxExporter.export(ConnectorJmxExporter.java:60)
at org.quickfixj.jmx.JmxExporter.export(JmxExporter.java:60)
I changed the code in SessionJMXExporter.java to
private void addSessionIdProperties(SessionID sessionID, ObjectNameFactory nameFactory)
{ nameFactory.addProperty("beginString", sessionID.getBeginString()); nameFactory.addProperty("senderCompID", sessionID.getSenderCompID()); nameFactory.addProperty("targetCompID", sessionID.getTargetCompID()); //wrong: nameFactory.addProperty("qualifier", sessionID.getSessionQualifier()); nameFactory.addProperty("qualifiersess", sessionID.getSessionQualifier()); }and the exporting works.
Regards
Thomas Hügel