aspose file tools*
The moose likes JDBC 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
JavaRanch » Java Forums » Databases » JDBC
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: 129

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: 129

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>
 
 
subject: Connection pool with more than one database