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? What Method and class used for
Connection pooling in Java?

Answers were Sorted based on User's Feedback



What is connection pooling? What Method and class used for Connection pooling in Java? ..

Answer / qim2010

Connection pooling is the maintenance of a group of database
connections for reuse by applications on an application
server thus cutting down substantially on the number of new
connections that need to be created. It is part of the JDBC
2.0 Optional Package API. Another part of the Optional
Package API provides for the use of the Java Naming and
Directory Interface (JNDI) and DataSource objects instead of
JDBC 1.0 DriverManager objects to access relational data.

Connections made via a DataSource object that is implemented
to work with a middle tier connection pool manager will
participate in connection pooling. This can improve
performance dramatically because creating new connections is
very expensive.

Connection pooling is totally transparent. It is done
automatically in the middle tier of a J2EE configuration, so
from an application's viewpoint, no change in code is
required. An application simply uses the
DataSource.getConnection method to get the pooled connection
and uses it the same way it uses any Connection object.

The classes and interfaces used for connection pooling are:

ConnectionPoolDataSource
PooledConnection
ConnectionEvent
ConnectionEventListener

The connection pool manager, a facility in the middle tier
of a three-tier architecture, uses these classes and
interfaces behind the scenes. When a
ConnectionPoolDataSource object is called on to create a
PooledConnection object, the connection pool manager will
register as a ConnectionEventListener object with the new
PooledConnection object. When the connection is closed or
there is an error, the connection pool manager (being a
listener) gets a notification that includes a
ConnectionEvent object.

Is This Answer Correct ?    8 Yes 1 No

What is connection pooling? What Method and class used for Connection pooling in Java? ..

Answer / krishna priya

Connection pool is pool of connections where we can get ready made connections instead of creating every time. After using this connection object from pool these are replaced.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More JDBC Interview Questions

What are the different types of statements in jdbc?

0 Answers  


What is xe in oracle jdbc url?

0 Answers  


Does jdbctemplate use prepared statements?

0 Answers  


List the advantages of using datasource?

0 Answers  


Is jdbc secure?

0 Answers  


What is Connection Pooling ??? How we set up a particular connection within connection pooling ????

2 Answers   Cognizant,


How to move the cursor in scrollable resultset ?

0 Answers  


Hi friends, In JDBC 4 drivers are there among this which driver is best and why it is best.Which driver is most commonly used in web applications.

6 Answers  


What is jdbc architecture?

0 Answers  


What are the types of statements in jdbc?

0 Answers  


How does a custom RowSetReader get called from a CachedRowSet?

0 Answers  


Explain different types of locks in jdbc?

0 Answers  


Categories