Commons Dbcp
  1. Commons Dbcp
  2. DBCP-372

Statement Leak occurs when batch update is used.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.3, 1.4
    • Fix Version/s: 1.5.1, 2.0
    • Labels:
      None
    • Environment:

      Oracle 11g

      Description

      org.apache.commons.dbcp.PoolablePreparedStatement#passivate()
      execute clearBatch().
      (DBCP-264)

      But this clearBatch() throw SQLException.
      (DelegatingStatement#checkOpen() throw SQLException, because _closed is true.)

      The result,
      the PoolablePreparedStatement doesn't return to pool, and
      the PoolablePreparedStatement doesn't execute PreparedStatement#close().

      When a lot of data is processed,
      in the case of Oracle

      • ORA-00604
      • ORA-01000

      occurs.

      Proposal:
      "clearBatch();" in passivate() method
      changes as follows.

      batchAdded = false;
      getInnermostDelegate().clearBatch();

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Naozumi Taromaru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development