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

PoolablePreparedStatement invalidated because of non cleared batch

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      In PoolablePreparedStatement, passivate() method:
      The first thing in this method is to consider the statement as closed. But then, if a batch has been added, the clearBatch() method is called.
      That call is delegated to DelegatingStatement that send an SQLException because Statement is already considered as closed.
      Then the statement is removed from the pool cache because of this so the cache is useless.
      Maybe it should be better to get the innermost delegate in passivate() and then call clearBatch() on the underlying statement?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              steeveb Steeve Beroard
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: