• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Connection Pooling

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone

i know few things about connection pooling like it keeps a specified number of connections in a pool
and we use those connections during the run time insted of directy hitting the database

correct if am wrong

and what i would like to know is that can i increase the number of connection in the conection pool
during runtime so that if my all the connection in the connection pool are busy i can create a new connecton to the database
to assign to that xtra request
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Amol More wrote:
i know few things about connection pooling like it keeps a specified number of connections in a pool
and we use those connections during the run time insted of directy hitting the database



Correct.

Amol More wrote:
and what i would like to know is that can i increase the number of connection in the conection pool
during runtime so that if my all the connection in the connection pool are busy i can create a new connecton to the database
to assign to that xtra request



[not sure]Yes,you can increase the number of Connections in pool. web server has such a facility .
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

can i increase the number of connection in the conection pool during runtime so that if my all the connection in the connection pool are busy i can create a new connecton to the database to assign to that xtra request


No, that's generally not possible. The pool should be sized large enough to cover all situations; a size of 50 should be sufficient for heavily used applications. If more clients access the system, then it may not be a good idea to open more connections, since the DB is already working on 50 queries simultaneously. Starting more will just slow down everybody. It's better to put client requests on hold until a pool connection becomes available.

Also note that there's not much of a penalty for sizing the pool larger. Decent pool implementation will generally release unused connections after a while, thus keeping the number of open connections to a minimum.
 
Amol More
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for all your reply
 
His brain is the size of a cherry pit! About the size of this ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!