File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Connection Pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connection Pooling" Watch "Connection Pooling" New topic

Connection Pooling

Rick Charles

Joined: Jul 27, 2006
Posts: 25
Hi Guyz,

i have a question regarding connection pooling.Say i have 10 connection in my connection pool and all 10 connections are engaged. if the 11th client comes in and requests for a connection, what will happen ? whether will it create a new connection ?

Thanks in advance
Jan Cumps

Joined: Dec 20, 2006
Posts: 2565

will it create a new connection
Depending on your configuration (and on the pool you use), the pool will wait until a connection becomes available again (for a given time), or the pool will fail to give you a connection, or the pool will grow.

In commons-pool, these three ways of handling an exhausted pool are named: WHEN_EXHAUSTED_BLOCK, WHEN_EXHAUSTED_FAIL, WHEN_EXHAUSTED_GROW

Regards, Jan

OCUP UML fundamental and ITIL foundation
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1323

this article JDBC Connection Pooling Best Practices
by David Murphy might help you more on that.. read it and implement it..

[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
I agree. Here's the link:
subject: Connection Pooling
jQuery in Action, 3rd edition