org.exoplatform.services.jdbc.impl
Class ManagedDataSource
java.lang.Object
org.exoplatform.services.jdbc.impl.ManagedDataSource
- All Implemented Interfaces:
- Wrapper, CommonDataSource, DataSource
public class ManagedDataSource
- extends Object
- implements DataSource
This classes is used to wrap the original 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
- Version:
- $Id$
- Author:
- Nicolas Filotto
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManagedDataSource
public ManagedDataSource(DataSource ds,
TransactionManager tm,
boolean checkIfTxActive)
- default constructor
getLogWriter
public PrintWriter getLogWriter()
throws SQLException
- Specified by:
getLogWriter in interface CommonDataSource
- Throws:
SQLException- See Also:
CommonDataSource.getLogWriter()
getLoginTimeout
public int getLoginTimeout()
throws SQLException
- Specified by:
getLoginTimeout in interface CommonDataSource
- Throws:
SQLException- See Also:
CommonDataSource.getLoginTimeout()
setLogWriter
public void setLogWriter(PrintWriter out)
throws SQLException
- Specified by:
setLogWriter in interface CommonDataSource
- Throws:
SQLException- See Also:
CommonDataSource.setLogWriter(java.io.PrintWriter)
setLoginTimeout
public void setLoginTimeout(int seconds)
throws SQLException
- Specified by:
setLoginTimeout in interface CommonDataSource
- Throws:
SQLException- See Also:
CommonDataSource.setLoginTimeout(int)
isWrapperFor
public boolean isWrapperFor(Class<?> iface)
throws SQLException
- Specified by:
isWrapperFor in interface Wrapper
- Throws:
SQLException- See Also:
Wrapper.isWrapperFor(java.lang.Class)
unwrap
public <T> T unwrap(Class<T> iface)
throws SQLException
- Specified by:
unwrap in interface Wrapper
- Throws:
SQLException- See Also:
Wrapper.unwrap(java.lang.Class)
getConnection
public Connection getConnection()
throws SQLException
- Specified by:
getConnection in interface DataSource
- Throws:
SQLException- See Also:
DataSource.getConnection()
getConnection
public Connection getConnection(String username,
String password)
throws SQLException
- Specified by:
getConnection in interface DataSource
- Throws:
SQLException- See Also:
DataSource.getConnection(java.lang.String, java.lang.String)
getParentLogger
public Logger getParentLogger()
throws SQLFeatureNotSupportedException
- Throws:
SQLFeatureNotSupportedException- See Also:
javax.sql.CommonDataSource#getParentLogger()
Copyright © 2015 eXo Platform SAS. All Rights Reserved.