org.apache.log4j.db
Class DataSourceConnectionSource
java.lang.Object
|
+--org.apache.log4j.spi.ComponentBase
|
+--org.apache.log4j.db.ConnectionSourceSkeleton
|
+--org.apache.log4j.db.DataSourceConnectionSource
- All Implemented Interfaces:
- Component, ConnectionSource, OptionHandler
- public class DataSourceConnectionSource
- extends ConnectionSourceSkeleton
The DataSourceConnectionSource is an implementation of ConnectionSource
that obtains the Connection in the recommended JDBC manner based on
a DataSource
.
- Author:
- Ray DeCampo, Ceki Gülcü
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSourceConnectionSource
public DataSourceConnectionSource()
activateOptions
public void activateOptions()
- Description copied from interface:
OptionHandler
- Activate the options that were previously set with calls to option
setters.
This allows to defer activiation of the options until all
options have been set. This is required for components which have
related options that remain ambigous until all are set.
For example, the FileAppender has the File
and Append
options both of
which are ambigous until the other is also set.
getConnection
public Connection getConnection()
throws SQLException
- Description copied from interface:
ConnectionSource
- Obtain a
Connection
for use. The client is
responsible for closing the Connection
when it is no
longer required.
- See Also:
ConnectionSource.getConnection()
getDataSource
public DataSource getDataSource()
setDataSource
public void setDataSource(DataSource dataSource)
Copyright © 2000-2006 Apache Software Foundation.
Licensed under the Apache License, Version 2.0.