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

Statement Leak occurs when batch update is used.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.3, 1.4
    • 1.5.1, 2.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: