[QFJ-314] JMXExporter should escape the values of targetCompId and other session params Created: 03/Jun/08 Updated: 07/Aug/08 Resolved: 17/Jun/08 |
|
| Status: | Closed |
| Project: | QuickFIX/J |
| Component/s: | Engine |
| Affects Version/s: | 1.3.1 |
| Fix Version/s: | 1.3.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Dan Mihai Dumitriu | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The problem is that sometimes the SenderSubID contains the ':' character, and that totally messes up the JMX ObjectName. For instance, if the SessionSubID=ABC:ABC, the JMXExporter will create a name that violates the JMX naming spec. The culprit code is below, which basically creates an ObjectName of the form "org.quickfixj:key1=value1,key2=value2,key3=value3". If any key or value has a ':' or a '=' or a ',' in it, it will be messed up. These characters should be escaped, like with '_'. public class ObjectNameFactory { private StringBuffer sb = new StringBuffer(); public void addProperty(String name, String value) { sb.append(name).append('=').append(value); public ObjectName createName() throws MalformedObjectNameException { return ObjectName.getInstance("org.quickfixj:" + sb); }} |
| Comments |
| Comment by Steve Bate [ 17/Jun/08 ] |
|
The factory was modified to quote any values with otherwise invalid characters in them. Valid strings are not quoted since some JMX tools have problems with the quotes. |