public class WrappedDataSource extends Object implements DataSource
DataSource object with added some additional capabilities..| Constructor and Description |
|---|
WrappedDataSource(DataSource originalDataSource)
Wrapper of the default datasource provided by the underlying platform
It has some fault tolerance features, which are not available by default in the popular JDBC drivers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closedConnection(WrappedConnection wrappedConnection)
Closed connection.
|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
protected WrappedConnection |
getOldestConnection()
Gets the oldest connection.
|
Logger |
getParentLogger() |
protected void |
initAutoCommitEnabled()
Inits the auto commit enabled.
|
protected void |
initMaxConnectionsCount()
Inits the max connections count.
|
protected void |
initWaitCount()
Inits the wait count.
|
protected void |
initWaitTimeout()
Inits the wait timeout.
|
boolean |
isWrapperFor(Class<?> arg0) |
void |
setLoginTimeout(int arg0) |
void |
setLogWriter(PrintWriter arg0) |
<T> T |
unwrap(Class<T> arg0) |
public WrappedDataSource(DataSource originalDataSource)
originalDataSource - the original data sourceprotected void initAutoCommitEnabled()
protected void initMaxConnectionsCount()
protected void initWaitTimeout()
protected void initWaitCount()
public Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionprotected WrappedConnection getOldestConnection()
public void closedConnection(WrappedConnection wrappedConnection)
wrappedConnection - the wrapped connectionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic boolean isWrapperFor(Class<?> arg0) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic void setLogWriter(PrintWriter arg0) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int arg0)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic <T> T unwrap(Class<T> arg0) throws SQLException
unwrap in interface WrapperSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionCopyright © 2010–2018 Eclipse Foundation. All rights reserved.