Package javax.sql
Interface ConnectionPoolDataSource
-
- All Superinterfaces:
CommonDataSource
public interface ConnectionPoolDataSource extends CommonDataSource
An interface for the creation ofConnectionPoolDataSourceobjects. Used internally within the package.A class which implements the
ConnectionPoolDataSourceinterface is typically registered with a JNDI naming service directory and is retrieved from there by name.
-
-
Method Summary
All Methods Instance Methods Abstract Methods 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 Detail
-
getPooledConnection
PooledConnection getPooledConnection() throws SQLException
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
PooledConnection getPooledConnection(String theUser, String thePassword) throws SQLException
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.
-
-