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

Connection Pool: connecting in memory

Haroldo Nascimento
Ranch Hand

Joined: Aug 14, 2003
Posts: 79

I would like know if manager DB pool create a number of connection in memory to better the performance or the manager DB pool create connection on-demand only.

Other doubt is if the manager pooling connecting have mechanism of verify is the connectiong is "alive" for example executing any query select in the DB to verify the status of connecting ?

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

The answer to both questions is : "depends on the pool".

Since you're asking in the Apache/Tomcat forum, I'll talk about Jakarta's Database Connection Pool (DBCP).

1) the pool instantiates connections 'as needed' up to the configured maximum number of connections.

2) you can configure DBCP to do a verification query (for example, "SELECT 1").

All the settings for DBCP are documented here:
I agree. Here's the link:
subject: Connection Pool: connecting in memory
It's not a secret anymore!