This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Connection pool with more than one database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connection pool with more than one database" Watch "Connection pool with more than one database" New topic
Author

Connection pool with more than one database

Arun Kumar
Ranch Hand

Joined: Jan 21, 2005
Posts: 130

Hi All

I have a java application(not a web application) in which I have to update three databases based on certain conditions

I have been asked to implement Connection pooling

Now i am really confused should I maintain three different connection pools or a single pool will be sufficient

can any body please how some light on the subject
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Three different pools. A pool is associated to one specific data source. If you just had one big pool, you wouldn't know which database you were connecting to when you got a connection from it!


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Arun Kumar
Ranch Hand

Joined: Jan 21, 2005
Posts: 130

Thanks Paul Sturrock i will maintain thre different pools

is there any standard paractice that I can follow in the above mentioned scenario,where I have to use three different pools for three databases
Jeff Ash
Greenhorn

Joined: Apr 07, 2007
Posts: 11
Definitely checkout http://jakarta.apache.org/commons/dbcp/.

This is a connection pooling mechanism that is great. I have put it into place in a commercial application. It is easy to use and has a lot of different features should you need more than basic pooling.

Enjoy,


Jeff Ash<br /><a href="http://www.excellentiasoftware.com" target="_blank" rel="nofollow">Excellentia Software</a>
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Connection pool with more than one database
 
It's not a secret anymore!