[QFJ-181] Problem with multiple qualifier settings in JMX object name Created: 22/May/07  Updated: 04/Jul/07  Resolved: 25/May/07

Status: Closed
Project: QuickFIX/J
Component/s: Engine
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,
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



 Comments   
Comment by Steve Bate [ 22/May/07 ]

Thanks for the report.

Generated at Sat Nov 23 07:44:50 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.