Description of problem: Hadoop (CDH4) has ObjectNames like this: Hadoop:name=IPCLoggerChannel-127.0.0.1-234,service=NameNode Unfortunately, to query, this syntax is not currently supported: <c:simple-property name="objectName" default="Hadoop:name=IPCLoggerChannel-%addr%,service=NameNode" /> The solution is to allow %key% to appear within an attribute value, not as the entire value. The changes are probably supportable in ObjectNameQueryUtility itself. private void buildMatchMap(String objectNameQueryTemplate) { ... for (String key : keys) { Pattern p2 = Pattern.compile("^([^=]*)=\\%(.*)\\%$"); Matcher m2 = p2.matcher(key); maybe change to: Pattern p2 = Pattern.compile("^([^=]*)=(.*\\%(.*)\\%.*)$"); etc.
Merged in master f0a5cc74233f7e1ddf052e98834f80c238575b9d Thanks Elias
I have backed this out, as it contained unforseen side effects with the as4 plugin namely key-values of "name=*" are producing errors on as4. This may be a bug in the as4 (more specific eap4.3) mbean server, but needs to be addressed somehow e5f22a889fc6e8492