Overview of Connection Pooling in Java

Opening a database connection whenever required is a time consuming operation. To solve this problem we use connection pool. Connection pool maintains a number of open connections.

Initially the connection pool maintains a number of open connections specified by a configurable "minimum number of connections" value. When a new request for a connection comes, connection pool manager checks if the connection pool has any unused connection. If it finds an unused connection, it returns the connection to the caller. If all connections are busy, and the maximum pool size has not been reached, the new connection is created and added to the pool.

Assume the connection pool has the maximum number of open connections specified by a configurable "maximum number of connections" value. Now if a new connection request comes and if there is no free connection available, the request is queued up until a connection in the pool becomes available.

Connection pool increases the performance of Web applications by reusing the database connections instead of creating a new connection every time

 
 
 
 
Comments(1) Sign in (optional)
showing 1-1 of 1 comments,   sorted newest to the oldest
john
2014-07-10 10:54:31 
good but need more topics
(0) (0) Reply
 
Add a new comment...  (Use Discussion Board for posting new aptitude questions.)

Name:
Email: (optional)
2 + 6 = (please answer the simple math question)

Post Your Comment
X  
View & Edit Profile Sign out
X
Sign in
Google
Facebook
Twitter
Yahoo
LinkedIn
X