commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bas Schulte <>
Subject Verifying org.apache.commons.dbcp.BasicDataSource
Date Sun, 11 Nov 2007 12:49:45 GMT

I'm configuring a connection pool like this:

    <bean id="inboundDataSource"  
class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
       <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
       <property name="url" value="jdbc:mysql://localhost:3306/shdev"/>
       <property name="username" value="lala"/>
       <property name="password" value="lala"/>
       <property name="maxActive" value="20" />
       <property name="maxIdle" value="12" />
       <property name="minIdle" value="8" />
       <property name="testOnBorrow" value="true" />
       <property name="validationQuery" value="select 1" />

Now I'm trying to validate it is actually *using* the pool. I would  
expect to see at least 8 connections to my mysql database.

However, when I do 'show processlist' or SHOW GLOBAL STATUS LIKE  
'Threads_connected' while my app is running, I don't see any evidence  
of those 8 connections.

I tried making BasicDataSource emit some logging that shows when it  
is connecting etc. but apparently it doesn't log that sort of thing.

Anyone have an idea how I can confirm the pool is actually working?



                    bas a schulte   -   http://   -   -    

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message