public class ManagedDataSource extends Object implements DataSource
DataSource
in order to be able to support the managed data sources with a limited
amount of changes. A DataSource is expected to be wrapped only
when a data source is defined and has been configured as managed| Constructor and Description |
|---|
ManagedDataSource(DataSource ds,
TransactionManager tm,
boolean checkIfTxActive)
default constructor
|
| 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 ManagedDataSource(DataSource ds, TransactionManager tm, boolean checkIfTxActive)
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 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 Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionCommonDataSource.getParentLogger()Copyright © 2014 eXo Platform SAS. All Rights Reserved.