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 static import?

603


What is primitive array?

524


What is the applet security manager, and what does it provide?

544


What is a control variable example?

532


Can we increase size of array?

573






What is difference between printf and scanf?

523


Explain about narrowing conversion in java?

570


Is java a software?

516


What do you know about the garbage collector in java?

575


why are there separate wait and sleep methods? : Java thread

578


Why can't we make a class private in java?

539


What programs use java?

474


What is string pooling concept?

556


What is the difference between hashset and treeset in java?

543


What is void class in java?

528