This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection pool with more than one database

 
Arun Kumar
Ranch Hand
Posts: 133
Chrome Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Arun Kumar
Ranch Hand
Posts: 133
Chrome Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic