public interface ConnectionSource extends Component, org.apache.log4j.spi.OptionHandler
ConnectionSource
interface provides a pluggable means of
transparently obtaining JDBC Connection
s for log4j classes
that require the use of a Connection
.Modifier and Type | Field and Description |
---|---|
static int |
HSQL_DIALECT |
static int |
MSSQL_DIALECT |
static int |
MYSQL_DIALECT |
static int |
ORACLE_DIALECT |
static int |
POSTGRES_DIALECT |
static int |
UNKNOWN_DIALECT |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Obtain a
Connection for use. |
int |
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.
|
setLoggerRepository
static final int UNKNOWN_DIALECT
static final int POSTGRES_DIALECT
static final int MYSQL_DIALECT
static final int ORACLE_DIALECT
static final int MSSQL_DIALECT
static final int HSQL_DIALECT
Connection getConnection() throws SQLException
Connection
for use. The client is
responsible for closing the Connection
when it is no
longer required.SQLException
- if a Connection
could not be
obtainedint getSQLDialectCode()
boolean supportsGetGeneratedKeys()
boolean supportsBatchUpdates()
Copyright © 2002-2017 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache Chainsaw, Chainsaw, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.