• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

dbcp pool configuration from multiple Databases

 
Ranch Hand
Posts: 67
Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a single spring context which deal with multiple databases(total 5 databases) based on requests. I have set my db pool setting as below



Now my question is , this pool settings will be for whole context or for each database. Let say i says maxidle=8 so there can maxidle=8*5  or it would be always just for all 5 Databases.

Thanks
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't have one DBCP Connection Pool for multiple databases, you have one pool per database. Each one has its own JDBC URL, connection credentials - and pool settings.

Pools are collections of objects which are essentially identical. So a Connection to Database #1 and a Connection to Database #1 wouldn't make sense. How would you know which database you would be working with if you invoked getConnection on a pool of heterogeneous Connections?

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic