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 are the advantages of user defined functions?
Can we override the static methods?
What does a void function return?
How to retrieve data from database in java using arraylist?
How to solve the problem of generating the unique hash keys with hash function?
Which is faster call by value or call by reference?
When to use runnable interface vs thread class in java?
How many functional interfaces does java 8 have?
What is dot operator?
Does java runtime require a license?
Can you sort a string in java?
What is the difference between a vector & an array list?
What is the formula to calculate percentage?
What is member in java?
How is abstraction implemented in java ?