aspose file tools*
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Connection Pool: connecting in memory" Watch "Connection Pool: connecting in memory" New topic
Author

Connection Pool: connecting in memory

Haroldo Nascimento
Ranch Hand

Joined: Aug 14, 2003
Posts: 79
Hi

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 ?

thanks
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:
http://jakarta.apache.org/commons/dbcp/configuration.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pool: connecting in memory