what is connection pooling?

Answers were Sorted based on User's Feedback



what is connection pooling?..

Answer / m.m.reddy

A group of objects is called as a pool of objects. Object
pooling technique is used mainly to deal with the objects
that are expensive to create.An application using object
pooling technique follows the steps given below.
1).An application creates n'number of objects and places
these objects in the pool(assume n=10).
2).If the application has to use an object it picks up the
objects from the pool, uses the objects and returns the
objects to the pool(the objects return to the pool can be
reused)
3).At any point of time, if the number of objects are
available is not enough the application can add few more
objects to the pool.This is called as expanding the pool.
If there are more objects in the pool(100)but most of the
time a maximum upto 15 objects are used than the
application can be removed upto 90 objects from the pool.
This is called as SHRINKING the pool.
DriverManager.getConnection method establishes the
connection with the server and creates a connection object.
This operation is expensive(takes more amount of time).
When the connection is created using
DriverManager.getConnection calling con.close() closes the
connection.
As the creation of connection object is a expensive it is
recommanded to use connection pooling technique.
The J2EE servers like weblogic,JBoss,websphere etc manages
the connection pool as their own.

Is This Answer Correct ?    7 Yes 1 No

what is connection pooling?..

Answer / simdhuri

Ans: 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 of 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
ConnectionPool 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 ?    4 Yes 0 No

what is connection pooling?..

Answer / hariom rao(knowx)

This will give you acess to a collection of already opened
database connections,which will reduce the time it takes to
service a request,and u can service n number of requests at
once.

Is This Answer Correct ?    2 Yes 0 No

what is connection pooling?..

Answer / 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

what is connection pooling?..

Answer / m.m.reddy

mahe_msreddy@rediffmail.com (above answer)

Is This Answer Correct ?    1 Yes 1 No

what is connection pooling?..

Answer / swati purwar

A technique used for establishing a pool of resource
connections that applications can share on an application
server.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More JDBC Interview Questions

What are the considerations for deciding on transaction boundaries?

0 Answers  


What is jsp and jdbc?

0 Answers  


Explain about the drive manager class working?

0 Answers  


Describe how the jdbc application works.

0 Answers  


Where is mysql jdbc driver located?

0 Answers  






Explain the sequence of steps to connect to the database?

3 Answers   Wipro,


How do you determine the sensitivity of the ResultSet object?

0 Answers  


What is a java driver?

0 Answers  


What is de-normalization?

1 Answers  


What is a PreparedStatement?

3 Answers   Infosys,


How do java applications access the database using jdbc?

0 Answers  


Is java a database?

0 Answers  


Categories