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 ...
Get Database Programming with JDBC & Java, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.