Name
PooledConnection
Synopsis
Interface
Name: javax.sql.PooledConnection
Superclass: None
Immediate Subclasses: javax.sql.XAConnection
Interfaces Implemented: None
Availability: New as of JDK 1.2
Description
A PooledConnection represents a physical
connection to a data source. An application uses a
PooledConnection to grab a specific JDBC
connection object from the connection pool for use in talking to a
database.
Class Summary
public interface PooledConnection {
void addConnectionEventListener(ConnectionEventListener l)
throws java.sql.SQLException;
void close( ) throws java.sql.SQLException;
java.sql.Connection getConnection( )
throws java.sql.SQLException;
void removeConnectionEventListener(ConnectionEventListener l)
throws java.sql.SQLException;
}Object Methods
addConnectionEventListener( ) and removeConnectionEventListener( )
public void addConnectionEventListener(ConnectionEventListener l) throws java.sql.SQLException; public void removeConnectionEventListener(ConnectionEventListener l) throws java.sql.SQLException;
- Description
These two methods manage the addition and removal of objects listening for connection events generated by this pooled connection.
close( )
public void close( ) throws java.sql.SQLException;
- Description
This method will close all resources for the underlying connection to the database held by this pooled connection.
getConnection( )
public java.sql.Connection getConnection( ) throws java.sql.SQLException;
- Description
The
getConnection()method provides temporary access ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access