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
| Constructor and Description |
|---|
DataSourceConnectionSource() |
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
getConnection()
Obtain a
Connection for use. |
javax.sql.DataSource |
getDataSource() |
void |
setDataSource(javax.sql.DataSource dataSource) |
void |
start() |
discoverConnectionProperties, getPassword, getSQLDialectCode, getUser, isStarted, setPassword, setUser, stop, supportsBatchUpdates, supportsGetGeneratedKeysaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContextpublic void start()
start in interface LifeCyclestart in class ConnectionSourceBasepublic java.sql.Connection getConnection()
throws java.sql.SQLException
ConnectionSourceConnection for use. The client is
responsible for closing the Connection when it is no
longer required.java.sql.SQLException - if a Connection could not be
obtainedConnectionSource.getConnection()public javax.sql.DataSource getDataSource()
public void setDataSource(javax.sql.DataSource dataSource)
Copyright © 2010 - 2023 Adobe. All Rights Reserved