Has anyone come up with a mechanism that would allow a JDBCAppender to participate in a transaction?
I would like to use log4j as an "event logger" such that when specific updates are made in the context of a transaction, an event is logged in a dedicated database table. However, if the transaction ultimately rolls-back, I'd like all of these log entries to also rollback. The only way for this to happen is for the JDBCAppender to somehow have access to the Connection upon which the transaction is occuring. Is there anyway to pass that sort of context into the Logger?