OFBiz
  1. OFBiz
  2. OFBIZ-4283

DBCPConnectionFactory Configuration and Performance improvements

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 14.12.01
    • Component/s: framework
    • Labels:

      Description

      Hello,
      I enhanced DBCPConnectionFactory to provide more configuration options of DBCP:

      • jdbc-properties
      • test-on-borrow
      • test-on-return
      • test-while-idle
      • pool-timeout
      • soft-min-evictable-idle-time-millis

      And to read some existing one like validationQuery called pool-jdbc-test-stmt in Ofbiz XSD.

      I also added PreparedStatement Cache:

      • jdbc-maxOpenPreparedStatements

      These improvement require upgrade to:

      • commons-dbcp-1.4
      • commons-pool-1.5.6

      I also enhanced XSD.

      These enhancement make the JDBC pooling much more stable and fast.

      Regards
      Philippe Mouawad
      http://www.ubik-ingenierie.com

      1. patch-OFBIZ-4283.patch
        16 kB
        Philippe Mouawad

        Activity

        Hide
        Jacopo Cappellato added a comment -

        In rev. 1613431 I have committed a different version (based on Philippe Mouawad's patch) of the enhancements.
        Philippe, I have left out some of your features (that should not be required) and I have added others; and my work is based on the DBCP 2 API.
        It would be great if you could review this work and possibly test it and let me know your feedback.

        Show
        Jacopo Cappellato added a comment - In rev. 1613431 I have committed a different version (based on Philippe Mouawad's patch) of the enhancements. Philippe, I have left out some of your features (that should not be required) and I have added others; and my work is based on the DBCP 2 API. It would be great if you could review this work and possibly test it and let me know your feedback.
        Hide
        Jacques Le Roux added a comment -

        You are most welcome Jacopo

        Show
        Jacques Le Roux added a comment - You are most welcome Jacopo
        Hide
        Jacopo Cappellato added a comment -

        Jacques, thank you for the reference to this ticket. If you are not already working on it I would like to take care of it since I have just finished the upgrade and I should know how to port these feature. Is it ok?

        Show
        Jacopo Cappellato added a comment - Jacques, thank you for the reference to this ticket. If you are not already working on it I would like to take care of it since I have just finished the upgrade and I should know how to port these feature. Is it ok?
        Hide
        Jacques Le Roux added a comment -

        After upgrading to DBCP 2. I think we should consider and review Philippe's patch (even it's not applyable on trunk now). I stumbled upon it while looking for DBCP available patches (it's the only one). I will hopefully do it...

        Show
        Jacques Le Roux added a comment - After upgrading to DBCP 2. I think we should consider and review Philippe's patch (even it's not applyable on trunk now). I stumbled upon it while looking for DBCP available patches (it's the only one). I will hopefully do it...
        Hide
        Philippe Mouawad added a comment -

        Patch to:
        entity-config.xsd
        DBCPConnectionFactory.java

        This patch requires:

        • commons-dbcp-1.4.jar
        • commons-pool-1.5.6.jar
        Show
        Philippe Mouawad added a comment - Patch to: entity-config.xsd DBCPConnectionFactory.java This patch requires: commons-dbcp-1.4.jar commons-pool-1.5.6.jar

          People

          • Assignee:
            Jacopo Cappellato
            Reporter:
            Philippe Mouawad
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development