public class PoolDataSource extends Object implements ConnectionPoolDataSource
PoolDataSource allows to generate pooled connections.
It is implemented as a wrapper around a non-pooled data source object. Delegates all method calls except for "getPooledConnection" to the underlying datasource.
| Constructor and Description |
|---|
PoolDataSource(DataSource nonPooledDatasource)
Creates new PoolDataSource
|
PoolDataSource(String jdbcDriver,
String connectionUrl) |
| Modifier and Type | Method and Description |
|---|---|
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
PooledConnection |
getPooledConnection() |
PooledConnection |
getPooledConnection(String user,
String password) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
public PoolDataSource(DataSource nonPooledDatasource)
public PoolDataSource(String jdbcDriver, String connectionUrl) throws SQLException
SQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic PooledConnection getPooledConnection() throws SQLException
getPooledConnection in interface ConnectionPoolDataSourceSQLExceptionpublic PooledConnection getPooledConnection(String user, String password) throws SQLException
getPooledConnection in interface ConnectionPoolDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionCopyright © 2001–2018 Apache Cayenne. All rights reserved.