[
https://issues.apache.org/jira/browse/LOG4J2-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nick Williams resolved LOG4J2-489.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.0-rc1
Fixed with r1565858 and r1565878. The database appenders now connect to the
database (i.e., borrow from the connection pool) and begin a transaction on
every flush or every non-buffered {{writeInternal}}, then commit and disconnect
(i.e., return to pool) at the end of the flush or non-buffered
{{writeInternal}}.
Note also that the {{<DriverManager...>}} connection source plugin is no longer
available. It was removed because it was unsafe and didn't support connection
pooling. Please use the {{<DataSource...>}} or {{<ConnectionFactory...>}}
connection source plugins, instead.
> Should JPADatabaseManager being using so many transactions?
> -----------------------------------------------------------
>
> Key: LOG4J2-489
> URL: https://issues.apache.org/jira/browse/LOG4J2-489
> Project: Log4j 2
> Issue Type: Improvement
> Components: Appenders
> Affects Versions: 2.0
> Environment: JPA appender
> Reporter: Matt Sicker
> Assignee: Nick Williams
> Priority: Minor
> Labels: Appender, JPA, Performance, Transaction
> Fix For: 2.0-rc1
>
>
> Even when the appender is buffered, every log event is still committed each
> time. In JDBCAppender, when it's buffered, log events aren't inserted into
> the database until the buffer is full.
> I tried to address this while I was working on another patch, but there's no
> good way to generate an EntityTransaction without the EntityManager, and
> that's recreated each time writeInternal() is called.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]