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

Break statement can be used as labels in java?

773


How do you sing an Applet ?

2246


what is the final keyword denotes in java?

801


Explain the advantages of packages in java?

713


What is a loop java?

813


What is the destroy method?

822


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

785


How to create an immutable class?

777


Can we have return statement in finally clause? What will happen?

746


What is meant by collection in java?

789


What is the use of StringTokenizer class?

825


What is heterogeneous in java?

717


How do you declare an array that will hold more than 64KB of data?

921


Can we write any code after throw statement?

824


What are java threads?

851