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

Explain what is encapsulation?

846


What is the difference between the paint() and repaint() methods in java programming?

925


What is the history of java?

774


What are the high-level thread states in java programming?

858


Which is best ide for java?

821


How many bytes are there?

765


What is the name of the java compiler?

813


What is class level lock ?

822


How do you write methodology?

769


Can a class extend 2 classes in java?

807


Why is boolean important?

827


What is jagged array in java?

783


Can two objects have same hashcode?

776


What is ‘has a’’ relationship in java?

980


How do you declare a variable?

861