commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject Re: Verifying org.apache.commons.dbcp.BasicDataSource
Date Sun, 11 Nov 2007 13:03:38 GMT
Have you tried setting the initialSize property?

On 11/11/07, Bas Schulte <basschulte@gmail.com> wrote:
> Hi,
>
> 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" />
>     </bean>
>
>
> 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?
>
> thanks,
>
> bas.
>
> --
>                     bas a schulte   -   http://
> www.connectedcreations.nl   -   http://www.wittezeiltjes.nl   -
> +31653508689
>
>
>
>

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


Mime
View raw message