File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes What is Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "What is "Connection Pooling"" Watch "What is "Connection Pooling"" New topic

What is "Connection Pooling"

Suji N
Ranch Hand

Joined: Sep 04, 2001
Posts: 35
Hi Friends
What is "Connection Pooling"
I am developing Java Application using ms sql server 2000 database
Pl explain me about this

Joined: Oct 17, 2001
Posts: 2
Connection Pooling is a concept in which u can make a pool of connections to enhance the performance of your application.This is quite helpful as sometimes making and tearing a connection is more costly than actually executing the sql command.For this reason a pool is made to keep the connection alive and application can get the connection frm this pool to execute commands after which the connection is returned to the pool to be used again.If all the connections of the pool are being used, then new connections are made available to the application.
Connection pooling is supported by JDBC 2.0 in which a class called DBConnectionPool is there which provided methods to
get an open connection from the pool,
return a connection to the pool,
release all resources and close all connections at shutdown.
It also handles connection failures, such as time-outs, communication failures, etc. and can limit the number of connections in the pool to a predefined max value
Recently released JDBC 3.0 API provided some more new methods added to DBConnectionPool.Apert from it, JDBC 3.0 also provides method to pool Prepared statements which greatly enhances the application performance by saving resources.
I agree. Here's the link:
subject: What is "Connection Pooling"
It's not a secret anymore!