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 is @entity in java?

0 Answers  


What are the advantages of using preparedstatement over statement?

0 Answers  


How do I disallow NULL values in a table?

0 Answers  


Where is jdbc used?

0 Answers  


What should be done for auto generating primary key id in a table ?

0 Answers  






Why do we need a jdbcrowset like wrapper around resultset?

0 Answers  


What is JDBC Batch Processing and what are it’s benefits?

0 Answers  


DB2 Universal claims to support JDBC 2.0, But I can only get JDBC 1.0 functionality. What can I do?

0 Answers  


all Java qts are imp ?

1 Answers   eBay,


What are the different types of interfaces in the api component?

0 Answers  


What is metadata in programming?

0 Answers  


how to retrieve sql exceptions

2 Answers   Bosch,


Categories