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
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public PooledConnection getPooledConnection() throws SQLException
getPooledConnection
in interface ConnectionPoolDataSource
SQLException
public PooledConnection getPooledConnection(String user, String password) throws SQLException
getPooledConnection
in interface ConnectionPoolDataSource
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
Copyright © 2001–2015 Apache Cayenne. All rights reserved.