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 © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0
Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.