You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Karim Zibari <kz...@yahoo.com> on 2006/11/13 19:35:10 UTC
Connection Pooling
Hi
I have been using this connection pooling declaration for my web app for many months but I never really know
what it is doing:
<Resource name="jdbc/JSNDB" auth="Container" type="javax.sql.DataSource"
maxActive="50" maxIdle="30" maxWait="10000"
removeAbandoned="true" removeAbandonedTimeout="10" logAbandoned="true"
username="root" password="letmein2006" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/kurdishglobe_net?autoReconnect=true"/>
Specifically,
1- does this mean that 50 connections will be made available when the web app is loaded?
2- what happens if all the 50 connections are used up and there are more db connection requests?
3- what about the maxIdle="30"; there cannot be more than 30 idle connections ?
Best regards
Karim Zibari
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited
Re: Connection Pooling
Posted by David Smith <dn...@cornell.edu>.
With maxWait=10000, I believe on pool exhaustion, it'll wait for up to
10 seconds for one to become available. Failing that, I'm not sure.
The request might get a null connection back or an exception. Honestly
I've never looked at the internals of DBCP, but I have done some
programming work on commons-pool which came from the DBCP project.
--David
Karim Zibari wrote:
>Hi
>
>I have been using this connection pooling declaration for my web app for many months but I never really know
>what it is doing:
>
>
> <Resource name="jdbc/JSNDB" auth="Container" type="javax.sql.DataSource"
> maxActive="50" maxIdle="30" maxWait="10000"
> removeAbandoned="true" removeAbandonedTimeout="10" logAbandoned="true"
> username="root" password="letmein2006" driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/kurdishglobe_net?autoReconnect=true"/>
>
>Specifically,
>1- does this mean that 50 connections will be made available when the web app is loaded?
>2- what happens if all the 50 connections are used up and there are more db connection requests?
>3- what about the maxIdle="30"; there cannot be more than 30 idle connections ?
>
>Best regards
>Karim Zibari
>
>
>
>____________________________________________________________________________________
>Yahoo! Music Unlimited
>Access over 1 million songs.
>http://music.yahoo.com/unlimited
>
>
--
=======================================
David Smith
Network Operations Supervisor
Department of Entomology
College of Agriculture & Life Sciences
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: 607.255.9571
Fax: 607.255.0939
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org