|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.db.ConnectionSourceBase
ch.qos.logback.core.db.DriverManagerConnectionSource
public class DriverManagerConnectionSource
The DriverManagerConnectionSource is an implementation of
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
Field Summary |
---|
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
context |
Constructor Summary | |
---|---|
DriverManagerConnectionSource()
|
Method Summary | |
---|---|
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()
|
Methods inherited from class ch.qos.logback.core.db.ConnectionSourceBase |
---|
discoverConnnectionProperties, getPassword, getSQLDialectCode, getUser, isStarted, setPassword, setUser, stop, supportsBatchUpdates, supportsGetGeneratedKeys |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DriverManagerConnectionSource()
Method Detail |
---|
public void start()
start
in interface LifeCycle
start
in class ConnectionSourceBase
public Connection getConnection() 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
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 set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |