Package ch.qos.logback.core.db
Interface ConnectionSource
-
- All Superinterfaces:
LifeCycle
- All Known Implementing Classes:
ConnectionSourceBase
,DataSourceConnectionSource
,DriverManagerConnectionSource
,JNDIConnectionSource
public interface ConnectionSource extends LifeCycle
TheConnectionSource interface provides a pluggable means of transparently obtaining JDBCConnection
s for logback classes that require the use of aConnection
. For more information about this component, please refer to the online manual at http://logback.qos.ch/manual/appenders.html#DBAppender
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.sql.Connection
getConnection()
Obtain aConnection
for use.SQLDialectCode
getSQLDialectCode()
Get the SQL dialect that should be used for this connection.boolean
supportsBatchUpdates()
If the connection does not support batch updates, we will avoid using them.boolean
supportsGetGeneratedKeys()
If the connection supports the JDBC 3.0 getGeneratedKeys method, then we do not need any specific dialect support.
-
-
-
Method Detail
-
getConnection
java.sql.Connection getConnection() throws java.sql.SQLException
Obtain aConnection
for use. The client is responsible for closing theConnection
when it is no longer required.- Throws:
java.sql.SQLException
- if aConnection
could not be obtained
-
getSQLDialectCode
SQLDialectCode getSQLDialectCode()
Get the SQL dialect that should be used for this connection. Note that the dialect is not needed if the JDBC driver supports the getGeneratedKeys method.
-
supportsGetGeneratedKeys
boolean supportsGetGeneratedKeys()
If the connection supports the JDBC 3.0 getGeneratedKeys method, then we do not need any specific dialect support.
-
supportsBatchUpdates
boolean supportsBatchUpdates()
If the connection does not support batch updates, we will avoid using them.
-
-