Connection pool

4,799 views

Published on

http://rajjdbc.blogspot.in/

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
4,799
On SlideShare
0
From Embeds
0
Number of Embeds
28
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Connection pool

  1. 1. Connection Pool
  2. 2. • • • • • • • • • • A connection pool is a cache of database connections (connection objects) maintained in the database’s memory so that the connection can be reused when the database receives future requests for data. Connection pools are used to improve the perfomance of executing the commands on a database. Opening and maintaining a database connection for each user, especially requests made to a dynamic database-driven website application is costly and wastes resources. Once the connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established. If all the connections are used up a new connection is made and is added to the pool. The connection to be established is data store dependent; therefore, the time to be consumed while opening or closing a connection differes in different databases, such as Oracle, MySql, and SQLServer. Opening or closing a data store session increases load on the database, which affects the availability and performance of the application. In addition, opening closing a session(connection) to data store is a resoure consuming process. To solve all these problems, the pooling mechanism is used to establish connections before the clients makes a request. In other words, the connection objects created to represent the session established to the data store pooled and recycled for further use. This mechanism is known as connection pooling in which a connection is retrieved from the pool, used by an application, and then returned to the pool. The pool contains the objects of the physical connections.
  3. 3. Classes and interfaces • • • • ConnectionPoolDataSource PooledConnection ConnectionEvent ConnectionEvenListener

×