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 are advantages of using Java?s layout managers than windowing systems?

1843


What is split return?

481


What is a flag and how does it work?

491


Which sort is best in java?

514


How do I get the | symbol on my keyboard?

577






How do generics work in java?

506


What's the difference between int and integer in java?

521


What is string intern in java?

535


What is the difference between jvm and jre? What is an interface?

533


What is a null check?

524


What is string made of?

515


Can sleep() method causes another thread to sleep?

549


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

553


When is the garbage collection used in Java?

643


why an outer class cannot be declared as private?

3590