1. Derby
  2. DERBY-3319

Logical connections do not check if a transaction is active on close


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s:,,
    • Fix Version/s:
    • Component/s: JDBC, Network Client
    • Labels:
    • Environment:
      Embedded driver and client driver.
    • Issue & fix info:
      Release Note Needed


      If you call close on a logical connection, for instance as obtained through a PooledConnection, it does not check if there is an active transaction.
      The close of the logical connection is allowed, and even the close of the parent PooledConnection is allowed in the client driver. This can/will cause resources to be left on the server, and later operations might fail (typically with lock timeouts because the "closed" transaction is still holding locks).
      I do not know if gc will solve this eventually, but I would say the current behavior of the client driver is wrong in any case.
      There is difference in the behavior between the embedded and the client driver, and there also seems to be a bug in the embedded driver.

      The analysis above is a bit sketchy, so it might be required to look into the issue a bit more...
      I will attach a repro (JDBC usage should be verified as well, is it legal / as intended?)

      1. releaseNote.html
        5 kB
        Knut Anders Hatlen
        2 kB
        Kristian Waagan
      3. d3319-1a.stat
        0.7 kB
        Knut Anders Hatlen
      4. d3319-1a.diff
        18 kB
        Knut Anders Hatlen

        Issue Links


          No work has yet been logged on this issue.


            • Assignee:
              Knut Anders Hatlen
              Kristian Waagan
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: