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
Sets the driver class.
|
void |
setUrl(String
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()
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 StringgetUrl()
public void setUrl(Stringurl)
url - The url to set
public StringgetDriverClass()
public void setDriverClass(StringdriverClass)
driverClass - The driver class to set