You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Jonathan Gallimore (JIRA)" <ji...@apache.org> on 2018/10/10 15:06:00 UTC

[jira] [Created] (TOMEE-2257) Track connection proxies in the transaction

Jonathan Gallimore created TOMEE-2257:
-----------------------------------------

             Summary: Track connection proxies in the transaction
                 Key: TOMEE-2257
                 URL: https://issues.apache.org/jira/browse/TOMEE-2257
             Project: TomEE
          Issue Type: Improvement
            Reporter: Jonathan Gallimore
            Assignee: Jonathan Gallimore


Under load, it is possible for connection proxies to be cleaned up while they are still associated with a transaction. The result is that the connection resources are closed as the AutoConnectionTracker cleans up, and the connection associated with the transaction is returned to the pool, thus failing next time it is used.

The change proposed does the following:
 * Maintains a reference to the proxy for the duration of the transaction to prevent it being cleared up
 * When detecting abandoned connections, clearly log these at WARN level, allowing the developer to inspect their code and fix any leaks
 * allow the destruction of proxies to be turned off (this does not turn off the logging)
 * provide a test to ensure connections aren't aggressively cleaned up when there is a lot of GC
 * provide tests to make sure abandoned connections are clearly logged



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)