core-jgi/migration
Jasper Siepkes 861e3ad01f
IDEMPIERE-5013 Implement HikariCP as a replacement for c3p0 (#926)
* Replaced PostgreSQL and Oracle connection pools with HikariCP.

Replaced C3P0 with HikariCP. HikariCP is a Apache licensed connection pool with substantially better performance and better resilience to failure (DB disconnects, etc.) then C3P0. Read more about it here: https://github.com/brettwooldridge/HikariCP .

Cleaned up the `getCachedConnection` method. With HikariCP there is no need to retry to obtain a connection since getting an connection will block until a free connection is available or until a timeout is reached (default 30 seconds) at which point an `SQLException` is thrown. This also removed calling `Runtime.getRuntime().runFinalization();`. HikariCP is currently configured to detect / log leaks when a connection hasn't returned to the pool for longer then 5 minutes.

Loading of pool config properties was cleaned up. Defaults are now loaded from a single file instead of defaults coming from both file and hardcoded properties. It is now also possible to specify any HikariCP property in the user pool property file.

Initialization of the datasource must happen in the `getDataSource()` method because at object construction not all JDBC config is known. However this method could (as far as I could tell) be called concurrently from multiple threads but had no mechanism to prevent initializing the DB pool multiple times. The variable in which the pool itself was stored (`m_ds`) also was not marked volatile or immutable which could lead to visibility issues. Instead of lazy initialization of the pool in the `getDataSource()` method the pool could probably better be initialized at object construction. However I wasn't able to achieve that without breakage therefor I made the initialization mechanism work correctly with concurrent invocations.

Various config options such as the `MaxStatementsPerConnection` options were removed because HikariCP doesn't support them.

* (Re)added Sequence time-out.
2022-09-10 12:21:57 +02:00
..
i4.1 Migration folders for maintenance of new version 2017-10-31 23:26:16 +01:00
i4.1z Migration folders for maintenance of new version 2017-10-31 23:26:16 +01:00
i5.1 IDEMPIERE-2648 implement pack-in pack-out handle for infoWindow / move scripts to 6.1 2018-11-12 15:32:21 -02:00
i5.1z set version to 6.1 2018-11-04 14:47:53 -02:00
i6.1 Preparing release 6.2 - create folders for new version 2019-01-06 00:01:01 +01:00
i6.1z Preparing release 6.2 2019-01-05 23:34:22 +01:00
i6.2 release 7.1 process - prepare new migration folder for release 2019-11-21 23:31:40 +01:00
i6.2z IDEMPIERE-3413 Multi Select List and table reference - fix oracle seed - wrong application of script 201906171811_IDEMPIERE-3413.sql 2019-12-29 00:00:36 +01:00
i7.1 IDEMPIERE-4521 Release 8.1 - RC 2020-11-03 21:59:12 +01:00
i7.1z IDEMPIERE-4521 Release 8.1 - RC 2020-11-03 21:59:12 +01:00
i8.1z IDEMPIERE-4604 Release 8.2 2020-12-20 09:24:39 +01:00
i8.2 IDEMPIERE-5109 Release 9 Horizon (#1088) 2021-12-24 18:05:32 +08:00
i8.2z IDEMPIERE-5109 Release 9 Horizon (#1088) 2021-12-24 18:05:32 +08:00
i9 IDEMPIERE-5342 : Increase remaining ProfileInfo columns to 4000 (#1459) 2022-09-02 13:32:15 +02:00
iD10 IDEMPIERE-5013 Implement HikariCP as a replacement for c3p0 (#926) 2022-09-10 12:21:57 +02:00
local_sql IDEMPIERE-3655 Improve installer to include migration scripts and syncApplied 2018-03-14 18:13:08 -03:00
processes_post_migration IDEMPIERE-4262 on some condition, record insert by direct sql missing UUID (#1072) 2021-12-23 12:06:29 +01:00
zip_2pack IDEMPIERE-3655 Improve installer to include migration scripts and syncApplied 2018-03-14 18:13:08 -03:00
.project IDEMPIERE-4488 Remove .classpath from repository (#608) 2021-03-04 13:55:47 +01:00