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 differences between setmaxrows(int) and setfetchsize(int)?

0 Answers  


What is the purpose of jdbc resultset interface?

0 Answers  


What is static Synchronized method in JDBC API? Give an example?

3 Answers   3 Edge Solutions, R Systems, Sirvisetti Global Services,


I have getting problem to calling stored procedure from Mysql through JSP. Please help me.

1 Answers  


Why do we need jdbc api?

0 Answers  






What are the methods which can verify the cursor particular position?

0 Answers  


What is jdbc template?

0 Answers  


code to insert values/rows into oracle database from a java swing textfield when a button is pressed(using preparedstatements)

0 Answers  


What is difference between statement and preparedstatement in jdbc?

0 Answers  


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

0 Answers  


What causes no suitable driver error?

0 Answers  


What is namedparameterjdbctemplate?

0 Answers  


Categories