public class DataSourceConnectionSource extends ConnectionSourceSkeleton implements org.apache.log4j.xml.UnrecognizedElementHandler
ConnectionSource
that obtains the Connection in the recommended JDBC manner based on
a DataSource.
repositoryHSQL_DIALECT, MSSQL_DIALECT, MYSQL_DIALECT, ORACLE_DIALECT, POSTGRES_DIALECT, UNKNOWN_DIALECT| Constructor and Description |
|---|
DataSourceConnectionSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateOptions() |
Connection |
getConnection()
Obtain a
Connection for use. |
DataSource |
getDataSource() |
boolean |
parseUnrecognizedElement(Element element,
Properties props) |
void |
setDataSource(DataSource dataSource) |
discoverConnnectionProperties, getOverriddenSupportsGetGeneratedKeys, getPassword, getSQLDialectCode, getUser, setOverriddenSupportsGetGeneratedKeys, setPassword, setUser, supportsBatchUpdates, supportsGetGeneratedKeysgetLogger, getLoggerRepository, getNonFloodingLogger, resetErrorCount, setLoggerRepositoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetLoggerRepositorypublic void activateOptions()
activateOptions in interface org.apache.log4j.spi.OptionHandlerpublic Connection getConnection() throws SQLException
ConnectionSourceConnection for use. The client is
responsible for closing the Connection when it is no
longer required.getConnection in interface ConnectionSourceSQLException - if a Connection could not be
obtainedConnectionSource.getConnection()public DataSource getDataSource()
public void setDataSource(DataSource dataSource)
public boolean parseUnrecognizedElement(Element element, Properties props) throws Exception
parseUnrecognizedElement in interface org.apache.log4j.xml.UnrecognizedElementHandlerExceptionCopyright © 2002-2018 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.