Projects:Inclusion Of Apache JDBC Connection Pool In Distribution/Technical Specifications
Apache External Connection Pool module is an already existing module first published now 16 months ago (March 2014) which has been matured in production environments proving to be useful because implements the Tomcat JDBC Connection Pool.
Openbravo uses connection pools to reuse existing connections/prepared statements, avoiding the cost of initiating a connection, parsing SQL etc. By default Openbravo uses two different connection pools:
- Hibernate default connection pool for DAL-related queries.
- Apache DBCP for the connections provided by the ConnectionProviderImpl.
From 3.0PR14Q2 it is possible to specify an external connection provider to replace these two connection pools. Now with this project Openbravo provides an implementation of Tomcat JDBC Connection Pool.
The goal of this project is to include this module within Openbravo 3 distribution including some standard pre-configuration to make easier to use it. More details on how it works can be found in user documentation.
The idea of adding this module to the distribution is to enable it by default based on some standard configuration, so everyone installing or updating to 3.0PR15Q4 will automatically take advantage of it. Apache External Connection Pool module configuration is maintained per instance and consists in some new properties in Openbravo.properties file. The full list of configurable properties can be found here.
|The meaning and values of default properties can be found here.|
In addition to existing features, new capabilities will be implemented within the scope of this project:
- setQueryTimeout supported by PostgreSQL and Oracle. This Connection Pooling Improvements project researched about the query timeout implementation. For postgres it seems that in some versions it is not even implemented.
The performance requirement of this project is that the inclusion of the new pool should not significantly degrade performance. It has been done two types of tests:
- Some performance tests to obtain multiple serial connections. Test is here and results can be found here.
- Some tests of overhead generated by the execution of sweeper thread. Results can be found here.