File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Connection Pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Connection Pooling" Watch "Connection Pooling" New topic
Author

Connection Pooling

Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
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
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

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 .
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42908
    
  69
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
Greenhorn

Joined: Jan 22, 2010
Posts: 29
thanks for all your reply
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pooling