wood burning stoves
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: 2551

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: 1321

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: http://aspose.com/file-tools
subject: Connection Pooling
jQuery in Action, 3rd edition