You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Anthony Biacco <ab...@handll.com> on 2015/12/05 10:07:40 UTC

[dbcp] JMX mbean doesn't exist after upgrade to 2.1/2.1.1

I was running dbcp 2.0.1 with pool 2.4.2.
I updated dbcp to 2.1 and the mbean org.apache.commons.pool2 doesn't exist
anymore. 2.1.1 is a no-go as well
I'm running under Tomcat 8.0.28

Could this have to do with: https://issues.apache.org/jira/browse/DBCP-434 ?

Example of one of my resources is:

        <Resource
                name="jdbc/NAME" auth="Container"
type="javax.sql.DataSource"
                factory="org.apache.commons.dbcp2.BasicDataSourceFactory"
                username="USERNAME"
                password="PASSWORD"
                driverClassName="com.mysql.jdbc.Driver"
                url="URL"
                initialSize="5"
                minIdle="5"
                maxIdle="20"
                maxTotal="50"
                maxWaitMillis="4000"
                testOnBorrow="true"
                testWhileIdle="true"
                blockWhenExhausted="true"
                numTestsPerEvictionRun="20"
                timeBetweenEvictionRunsMillis="120000"
                softMinEvictableIdleTimeMillis="119000"
                minEvictableIdleTimeMillis="-1"
                validationQuery="/* ping */"
                validationQueryTimeout="2"
                removeAbandoned="true"
                removeAbandonedOnBorrow="true"
                removeAbandonedTimeout="60"
                logAbandoned="true"
        />

Thanks,

-Tony

Re: [dbcp] JMX mbean doesn't exist after upgrade to 2.1/2.1.1

Posted by Anthony Biacco <ab...@handll.com>.
On Sun, Dec 6, 2015 at 9:31 PM, Phil Steitz <ph...@gmail.com> wrote:

> On 12/5/15 2:07 AM, Anthony Biacco wrote:
> > I was running dbcp 2.0.1 with pool 2.4.2.
> > I updated dbcp to 2.1 and the mbean org.apache.commons.pool2 doesn't
> exist
> > anymore. 2.1.1 is a no-go as well
> > I'm running under Tomcat 8.0.28
> >
> > Could this have to do with:
> https://issues.apache.org/jira/browse/DBCP-434 ?
>
> Yes, as of DBCP 2.1, you need to specify a jmxName in order for the
> pool (and statement pools) to be registered with JMX.
> Unfortunately, the bug being tracked now as DBCP-452 makes
> specification of the jmxName property in a JNDI resource definition
> ineffective.  Once 2.2 is released with the fix for DBCP-452, you
> will be able to specify a jmxName property and the pool will
> register itself under that name.
>
> Phil
>
>
Thanks, i'll downgrade while waiting for the new version.

-Tony

Re: [dbcp] JMX mbean doesn't exist after upgrade to 2.1/2.1.1

Posted by Phil Steitz <ph...@gmail.com>.
On 12/5/15 2:07 AM, Anthony Biacco wrote:
> I was running dbcp 2.0.1 with pool 2.4.2.
> I updated dbcp to 2.1 and the mbean org.apache.commons.pool2 doesn't exist
> anymore. 2.1.1 is a no-go as well
> I'm running under Tomcat 8.0.28
>
> Could this have to do with: https://issues.apache.org/jira/browse/DBCP-434 ?

Yes, as of DBCP 2.1, you need to specify a jmxName in order for the
pool (and statement pools) to be registered with JMX. 
Unfortunately, the bug being tracked now as DBCP-452 makes
specification of the jmxName property in a JNDI resource definition
ineffective.  Once 2.2 is released with the fix for DBCP-452, you
will be able to specify a jmxName property and the pool will
register itself under that name.

Phil
>
> Example of one of my resources is:
>
>         <Resource
>                 name="jdbc/NAME" auth="Container"
> type="javax.sql.DataSource"
>                 factory="org.apache.commons.dbcp2.BasicDataSourceFactory"
>                 username="USERNAME"
>                 password="PASSWORD"
>                 driverClassName="com.mysql.jdbc.Driver"
>                 url="URL"
>                 initialSize="5"
>                 minIdle="5"
>                 maxIdle="20"
>                 maxTotal="50"
>                 maxWaitMillis="4000"
>                 testOnBorrow="true"
>                 testWhileIdle="true"
>                 blockWhenExhausted="true"
>                 numTestsPerEvictionRun="20"
>                 timeBetweenEvictionRunsMillis="120000"
>                 softMinEvictableIdleTimeMillis="119000"
>                 minEvictableIdleTimeMillis="-1"
>                 validationQuery="/* ping */"
>                 validationQueryTimeout="2"
>                 removeAbandoned="true"
>                 removeAbandonedOnBorrow="true"
>                 removeAbandonedTimeout="60"
>                 logAbandoned="true"
>         />
>
> Thanks,
>
> -Tony
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org