Package javax.sql
Interface ConnectionPoolDataSource
- All Superinterfaces:
CommonDataSource
public interface ConnectionPoolDataSource extends CommonDataSource
An interface for the creation of
ConnectionPoolDataSource objects.
Used internally within the package.
A class which implements the ConnectionPoolDataSource interface is
typically registered with a JNDI naming service directory and is retrieved
from there by name.
-
Method Summary
Modifier and Type Method Description PooledConnectiongetPooledConnection()Creates a connection to a database which can then be used as a pooled connection.PooledConnectiongetPooledConnection(String theUser, String thePassword)Creates a connection to a database, using the supplied user name and password, which can then be used as a pooled connection.Methods inherited from interface javax.sql.CommonDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
-
Method Details
-
getPooledConnection
Creates a connection to a database which can then be used as a pooled connection.- Returns:
- a
PooledConnectionwhich represents the connection to the database. - Throws:
SQLException- if there is a problem accessing the database.
-
getPooledConnection
Creates a connection to a database, using the supplied user name and password, which can then be used as a pooled connection.- Parameters:
theUser- the a user name for the database login.thePassword- the password associated with the user identified bytheUser.- Returns:
- a
PooledConnectionobject which represents the connection to the database. - Throws:
SQLException- if there is a problem accessing the database.
-