Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.core.appender.db.jdbc
Interface ConnectionSource

All Known Implementing Classes:
  DataSourceConnectionSource, FactoryMethodConnectionSource

    public interface ConnectionSource

Configuration element for `JdbcAppender`. If you want to use the `JdbcAppender` but none of the provided connection sources meet your needs, you can simply create your own connection source.

Method Summary
`Connection` | `getConnection()` This should return a new connection every time it is called.
`String` | `toString()` All implementations must override `Object.toString()` to provide information about the connection configuration (obscuring passwords with one-way hashes).

Method Detail

### getConnection

    Connection getConnection()
                             throws SQLException

  This should return a new connection every time it is called.

  Returns:
    the SQL connection object.
  Throws:
    `SQLException` - if a database error occurs.

### toString

    String toString()

  All implementations must override `Object.toString()` to provide information about the connection configuration (obscuring passwords with one-way hashes).

  Overrides:
    `toString` in class `Object`
  Returns:
    the string representation of this connection source.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.