|
JavaTM 2 Platform Std. Ed. v1.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An object that provides hooks for connection pool management.
A PooledConnection
object
represents a physical connection to a data source. The connection
can be recycled rather than being closed when an application is
finished with it, thus reducing the number of connections that
need to be made.
An application programmer does not use the PooledConnection
interface directly; rather, it is used by a middle tier infrastructure
that manages the pooling of connections.
Method Summary | |
void |
addConnectionEventListener(ConnectionEventListener listener)
Registers the given event listener so that it will be notified when an event occurs on this PooledConnection object. |
void |
close()
Closes the physical connection that this PooledConnection
object represents. |
Connection |
getConnection()
Creates an object handle for the physical connection that this PooledConnection object represents. |
void |
removeConnectionEventListener(ConnectionEventListener listener)
Removes the given event listener from the list of components that will be notified when an event occurs on this PooledConnection object. |
Method Detail |
public Connection getConnection() throws SQLException
PooledConnection
object represents. The object
returned is a temporary handle used by application code to refer to
a physical connection (this PooldedConnection
object)
that is being pooled.
Connection
object that is a handle to
this PooledConnection
object
SQLException
- if a database access error occurspublic void close() throws SQLException
PooledConnection
object represents.
SQLException
- if a database access error occurspublic void addConnectionEventListener(ConnectionEventListener listener)
PooledConnection
object.
listener
- a component that has implemented the
ConnectionEventListener
interface and wants to be
notified when the connection is closed or has an error;
generally, a connection pool managerremoveConnectionEventListener(javax.sql.ConnectionEventListener)
public void removeConnectionEventListener(ConnectionEventListener listener)
PooledConnection
object.
listener
- a component that has implemented the
ConnectionEventListener
interface and been
been registered as a listener; generally, a connection pool manageraddConnectionEventListener(javax.sql.ConnectionEventListener)
|
JavaTM 2 Platform Std. Ed. v1.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.