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

setAutoCommit called too many times

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 2.0
    • None

    Description

      passivateObject in PoolableConnectionFactory sets autoCommit to true, even if defaultAutoCommit is set to false. This results in two extra db queries for every use of the connection (set false, do work, set true). This creates a significant amount of overhead, even if the connection is never even used.

      I propose it be changed to:

      if(conn.getAutoCommit() != _defaultAutoCommit)
      {
      conn.setAutoCommit(_defaultAutoCommit);
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            orangedog OD
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: