public class DriverManagerConnectionSource extends ConnectionSourceBase
ConnectionSource that obtains the Connection in the traditional JDBC
manner based on the connection URL.
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 |
|---|
DriverManagerConnectionSource() |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection()
Obtain a
Connection for use. |
String |
getDriverClass()
Returns the name of the driver class.
|
String |
getUrl()
Returns the url.
|
void |
setDriverClass(String driverClass)
Sets the driver class.
|
void |
setUrl(String url)
Sets the url.
|
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 String getUrl()
public void setUrl(String url)
url - The url to setpublic String getDriverClass()
public void setDriverClass(String driverClass)
driverClass - The driver class to setCopyright © 2005–2018 QOS.ch. All rights reserved.