Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
6041 | minor | always | 03-17-17 09:04 | 04-24-17 15:32 | |
|
|||||
Reporter: | kpokrovsky | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | |||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.52 | ||
|
|||||
Summary: | 0006041: com.caucho.jmx.MBeanView does not match wildcard queries | ||||
Description: |
log4j2 can't reload mbeand due to that, because resin's mbean server can't unlink old beans. 265: private boolean isMatch(ObjectName name, ObjectName queryName, QueryExp query): ... if (queryName.isPropertyPattern()) { // If the queryName has a '*' in the properties, then check // the queryName properties to see if they match Hashtable<String,String> map = queryName.getKeyPropertyList(); Iterator<String> iter = map.keySet().iterator(); while (iter.hasNext()) { String key = iter.next(); String value = map.get(key); if (! value.equals(name.getKeyProperty(key))) return false; } } ... The comment is correct. But why equals on value?! No wildcard matching actually happens just plain string comparison. Correct would be: if (! name.getKeyProperty(key).matches(value.replace("?", ".?").replace("*", ".*?"))) return false; |
||||
Steps To Reproduce: | Configure log4j2 in a web project and try to reload config using JMX. You will see an exception saying that Resin can't register log4j2 beans because they already exist. | ||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|