Uploaded image for project: 'Commons Dbcp'
  1. Commons Dbcp
  2. DBCP-372

Statement Leak occurs when batch update is used.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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();

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: