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 the purpose of the system class in java?
What is class and object in java?
Why is inheritance used in java?
Which are different kinds of source code?
What is an array length?
What is ‘is-a ‘ relationship in java?
How do you create a first line indent?
Explain the init method?
What are the advantages of passing this into a method instead of the current class object itself?
What is a boolean used for?
What an i/o filter?
What is java regex?
What is the meaning of nullable?
What is the base class of all exception classes in java?
What is floor in java?