Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 466151741C for ; Thu, 4 Jun 2015 12:37:38 +0000 (UTC) Received: (qmail 41634 invoked by uid 500); 4 Jun 2015 12:37:38 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 41534 invoked by uid 500); 4 Jun 2015 12:37:38 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 41522 invoked by uid 99); 4 Jun 2015 12:37:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2015 12:37:38 +0000 Date: Thu, 4 Jun 2015 12:37:37 +0000 (UTC) From: "Bastien Colmard (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (POOL-298) Wrong jmxNameBase default value MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/POOL-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bastien Colmard updated POOL-298: --------------------------------- Description: 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 debug. 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}{code} The fix would be https://github.com/apache/commons-pool/blob/trunk/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java#L192 (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 was: 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 debug. 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}{code} https://github.com/apache/commons-pool/blob/trunk/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java#L192 (introduced in December 2013 it seems) The fix would be {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 > Wrong jmxNameBase default value > ------------------------------- > > Key: POOL-298 > URL: https://issues.apache.org/jira/browse/POOL-298 > 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 debug. > 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}{code} > The fix would be > https://github.com/apache/commons-pool/blob/trunk/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java#L192 (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 (v6.3.4#6332)