• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pooling

 
Supri dharshni
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Instead of creating and opening new connections for each and every request we have the connections in a connection pool.But what happens when the number requests exceeds the pool size limit.Will any exception is thrown? If so then how we have to handle such situation.Please reply.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What sort of connections?
The best answer is 'it depends'.

It is acceptable to force a thread to wait if a connection is not available, but a Thread should not be starved and should not be forced to wait forever.
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of the times the connection pool object would have this documented. Most of the time I suspect they wait put you in wait with some timeout. All of this is configurable. Most of the times the max required connection can be safely set. If not most connection pool allow you to set maxConnection to no limit.

P.S - When I say connectionPool I mean a DataBase Connection Pool.
 
Hardik N Shah
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apache Common DBCP manages all this things very well
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic