org.apache.log.output.db
public abstract class AbstractJDBCTarget extends AbstractTarget
| Constructor Summary | |
|---|---|
| protected | AbstractJDBCTarget(DataSource dataSource)
Creation of a new instance of the AbstractJDBCTarget. |
| Method Summary | |
|---|---|
| protected void | checkConnection()
Utility method to check connection and bring it back up if necessary. |
| void | close()
Shutdown target.
|
| protected void | closeConnection()
Close connection to underlying database.
|
| protected void | doProcessEvent(LogEvent event)
Process a log event, via formatting and outputting it.
|
| protected Connection | getConnection()
Utility method for subclasses to access connection.
|
| protected boolean | isStale()
Detect if connection is stale and should be reopened.
|
| protected void | open()
Startup log session.
|
| protected void | openConnection()
Open connection to underlying database.
|
| protected abstract void | output(LogEvent event)
Output a log event to DB.
|
Parameters: dataSource the JDBC datasource
Parameters: event the log event
Throws: Exception if an event processing error occurs
Returns: the Connection
Returns: true if connection is stale, false otherwise
Parameters: event the log event.