Commons Dbcp
  1. Commons Dbcp
  2. DBCP-210

Have dbcp close pooled prepared statements after some settable time limit

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      The problem is, when poolPreparedStatements is set to true and the database is heavy loaded, the prepared statements are never closed. After some time, as the database contents changes, they become unoptimal. It would be nice to have another parameter telling for how long each statement can be kept open.

        Issue Links

          Activity

          Hide
          Mark Thomas added a comment -

          The duplicate is looking at a slightly different issue but the solution is the same - use a custom eviction policy which it is now possible to configure with DBCP2.

          Show
          Mark Thomas added a comment - The duplicate is looking at a slightly different issue but the solution is the same - use a custom eviction policy which it is now possible to configure with DBCP2.
          Hide
          Mark Thomas added a comment -

          With Pool 2 this should be possible via a custom eviction policy that looks at how long the object has been alive.

          Show
          Mark Thomas added a comment - With Pool 2 this should be possible via a custom eviction policy that looks at how long the object has been alive.
          Hide
          Phil Steitz added a comment -

          Moving to 1.4 where more robust pool and pooled object lifecycle features will be considered.

          Show
          Phil Steitz added a comment - Moving to 1.4 where more robust pool and pooled object lifecycle features will be considered.
          Hide
          Phil Steitz added a comment -

          This is sort of a consequence of pooling prepared statements, so an argument could be made for "Wont Fix", but ideas / patches for how to satisfy this request without impacting pool performance will be considered in 1.3.

          Show
          Phil Steitz added a comment - This is sort of a consequence of pooling prepared statements, so an argument could be made for "Wont Fix", but ideas / patches for how to satisfy this request without impacting pool performance will be considered in 1.3.

            People

            • Assignee:
              Unassigned
              Reporter:
              Piotr Kołaczkowski
            • Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development