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
What is class level lock ?
Which sort is best in java?
How use .contains in java?
What is a stringbuilder?
What is difference between wait and notify in java?
What is the this keyword?
What are the elements of java?
What is the default size of load factor in hashing based collection?
Difference between concurrent hashmap and hashtable and collections
Can private class be extended java?
What are the access modifiers in java?
What is logical variable?
What is array class in java?
What is an argument java?
What are the difference between composition and inheritance in java?