public class PooledDataSource extends Object implements DataSource
getConnection() or
getConnection(String, String) a new connection is created if there
is none available. This will allow the pool to grow on demand.| Constructor and Description |
|---|
PooledDataSource(DataSource originalDataSource)
Creates a new pooled data source that wraps the given data source.
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
<T> T |
unwrap(Class<T> iface) |
public PooledDataSource(DataSource originalDataSource)
originalDataSource - The original data sourcepublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionDataSource.getConnection()public Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionDataSource.getConnection(java.lang.String,
java.lang.String)public PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionCommonDataSource.getLogWriter()public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionCommonDataSource.getLoginTimeout()public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionCommonDataSource.setLogWriter(java.io.PrintWriter)public void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionCommonDataSource.setLoginTimeout(int)public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionWrapper.isWrapperFor(java.lang.Class)public <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionWrapper.unwrap(java.lang.Class)public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionCopyright © 2026. All rights reserved.