public class DataSourceConnectionSource extends ConnectionSourceBase
ConnectionSource that obtains the Connection in the recommended JDBC
manner based on a DataSource.
For more information about this component, please refer to the online manual at http://logback.qos.ch/manual/appenders.html#DBAppender
context| Constructor and Description |
|---|
DataSourceConnectionSource() |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection()
Obtain a
Connection for use. |
DataSource |
getDataSource() |
void |
setDataSource(DataSource dataSource) |
void |
start() |
discoverConnectionProperties, getPassword, getSQLDialectCode, getUser, isStarted, setPassword, setUser, stop, supportsBatchUpdates, supportsGetGeneratedKeysaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic void start()
start in interface LifeCyclestart in class ConnectionSourceBasepublic Connection getConnection() throws SQLException
ConnectionSourceConnection for use. The client is
responsible for closing the Connection when it is no
longer required.SQLException - if a Connection could not be
obtainedConnectionSource.getConnection()public DataSource getDataSource()
public void setDataSource(DataSource dataSource)
Copyright © 2005–2018 QOS.ch. All rights reserved.