Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-2257

Track connection proxies in the transaction

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      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

      Attachments

        Activity

          People

            jgallimore Jonathan Gallimore
            jgallimore Jonathan Gallimore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: