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

How does arraylist size increase in java?

529


What are the two categories of data types in the java programming language?

502


Is java a compiler?

563


What is array pointers ?

603


What is private static class in java?

510






What is communist flag?

565


What is final keyword in java? Give an example.

574


What is ordered map in java?

535


What the difference is between execute, execute Query, execute Update?

372


Is binary a low level language?

499


What are the object and class classes used for?

552


what is the difference between the methods sleep() and wait()? : Java thread

513


What is listnode in java?

532


What is linked hashset and its features?

543


What is the use of singleton class?

519