commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] [Commented] (POOL-298) Wrong jmxNameBase default value, unable to set jmxNamePrefix
Date Fri, 05 Jun 2015 15:47:00 GMT


Phil Steitz commented on POOL-298:

Thanks for reporting this.  No need for a PR or patch, as the change is simple.  Being discussed
now on the dev list.

> Wrong jmxNameBase default value, unable to set jmxNamePrefix
> ------------------------------------------------------------
>                 Key: POOL-298
>                 URL:
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Bastien Colmard
>            Priority: Minor
> We needed to define our own pool names for Redis, to be able to know which pool was throwing
errors, but we experienced some difficulties.
> We use {{jedis-2.7.2}}, which uses {{commons-pool2-2.3}} configured with spring beans.
After setting a custom {{jmxNamePrefix}}, we didn't notice any difference and proceeded to
> To my understanding, BaseGenericObjectPool.jmxRegister uses BaseObjectPoolConfig.jmxNameBase
to build its ObjectName, but jmxNameBase defaults to jmxNamePrefix which is "pool" (not a
valid domain) and throws a MalformedObjectNameException, falling back to "org.apache.commons.pool2:type=GenericKeyedObjectPool,name=pool".
> The current workaround is to force jmxNameBase to null with 
> {code:xml}<property name="jmxNameBase"><null/></property>{code}
> The fix would be
(introduced in December 2013 it seems)
> {code}
> -private String jmxNameBase = DEFAULT_JMX_NAME_PREFIX
> +private String jmxNameBase = DEFAULT_JMX_NAME_BASE
> {code}
> I can submit a Pull Request on Github but it looks like you only use it as a mirror

This message was sent by Atlassian JIRA

View raw message