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: [email protected] For additional commands, e-mail: [email protected]
