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
|
void |
start()
|
discoverConnectionProperties, getPassword, getSQLDialectCode, getUser, isStarted, setPassword, setUser, stop, supportsBatchUpdates, supportsGetGeneratedKeysaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic void start()
public ConnectiongetConnection() throws SQLException
ConnectionSource
Connection for use. The client is responsible for closing the
Connection when it is no longer required.
SQLException - if a
Connection could not be obtained
ConnectionSource.getConnection()
public DataSourcegetDataSource()
public void setDataSource(DataSourcedataSource)