What Method and class used for Connection pooling ?

Answer Posted / qim2010

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 ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an iterator interface in java programming?

632


Explain jdk, jre and jvm?

657


What is the size of an array?

637


Can we extend singleton class in java?

637


What is string manipulation?

593






What environment variables do I need to set on my machine in order to be able to run java programs?

674


What is static import?

701


What is the difference between yielding and sleeping in java programming?

674


What are the methods to rectify ambiguities in the interfaces in JAVA?

706


What is difference overloading and overriding?

685


What are the different types of inner classes?

624


What is the difference between double and float variables in java?

722


What exactly is java?

603


Why super is first line in java?

651


Is null an object java?

642