Commons Dbcp
  1. Commons Dbcp
  2. DBCP-346

DBCP cannot set GenericObjectPool.lifo

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2, 1.3, 1.4
    • Fix Version/s: 1.3.1, 1.4.1
    • Labels:
      None
    • Environment:

      All.

      Description

      Hi experts!

      I want to change the order of return connection.
      change the GenericObjectPool.lifo setting false.(default is true).

      However GenericObjectPool.lifo cannot be changed.
      Because the setter method is not implement in DBCP

      IMHO DBCP have to implement setter method of GenericObjectPool.lifo

      I made the patch that can change GenericObjectPool.lifo.

      Best regards.

      1. lifo_patch.txt
        5 kB
        Ken Tatsushita

        Activity

        Hide
        Phil Steitz added a comment -

        Thanks for the patch!

        I am +1 for including this in 1.3.1, 1.4.1 onward. Will review further and commit if there are no objections.

        As a workaround until fix versions are released, you can either

        1. override BasicDataSource.createConnectionPool() and set the desired lifo there
        2. Use PoolingDataSource instead, configuring the pool directly.

        Show
        Phil Steitz added a comment - Thanks for the patch! I am +1 for including this in 1.3.1, 1.4.1 onward. Will review further and commit if there are no objections. As a workaround until fix versions are released, you can either 1. override BasicDataSource.createConnectionPool() and set the desired lifo there 2. Use PoolingDataSource instead, configuring the pool directly.
        Hide
        Phil Steitz added a comment -

        Many thanks for the patch.

        Applied to both trunk and 1.4.x branch in r1056867, with slight changes to doc and reduction of visibility of BasicDataSource lifo property to private.

        Show
        Phil Steitz added a comment - Many thanks for the patch. Applied to both trunk and 1.4.x branch in r1056867, with slight changes to doc and reduction of visibility of BasicDataSource lifo property to private.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ken Tatsushita
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development