Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is connection pooling?

Answer Posted / bhudeep

With servlets, opening a database connection is a major
bottleneck because we are creating and tearing down a new
connection for every page request and the time taken to
create connection will be more.
Creating a connection pool is an ideal approach for
a complicated servlet. With a connection pool, we can
duplicate only the resources we need to duplicate rather
than the entire servlet. A connection pool can also
intelligently manage the size of the pool and make sure each
connection remains valid. A number connection pool packages
are currently available. Some like DbConnectionBroker are
freely available from
Java Exchange Works by creating an object that dispenses
connections and connection Ids on request.
The Connection Pool class maintains a Hastable,
using Connection objects as keys and Boolean values as
stored values. The Boolean value indicates whether a
connection is in use or not. A program calls getConnection
( ) method of the ConnectionPool for getting Connection
object it can use; it calls returnConnection ( ) to give the
connection back to the pool.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do we call a stored procedure from jdbc?

927


What is sqlwarning and discuss the procedure of retrieving warnings?

966


Why is odbc needed?

870


What are the differences between statement and preparedstatement interface?

938


What is savepoint in jdbc?

875


How to test jdbc connection to sql server?

964


What is the difference between jdbc and jndi?

946


What is the query used to display all tables names in SQL Server (Query analyzer)?

999


Explain the process of creating tables using NetBeans IDE?

928


What are clob and blob data types in jdbc?

994


Why do we use jdbc?

945


What is a rollback in jdbc?

887


What do you understand by DDL and DML statements?

879


How can I use the JDBC API to access a desktop database like Microsoft Access over the network?

970


What are JDBC Best Practices?

1051