• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Connection Pool: connecting in memory

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic