diff --git a/README.md b/README.md
index 20b1625..fe3f319 100644
--- a/README.md
+++ b/README.md
@@ -238,6 +238,7 @@ optional.
* `ATL_DB_VALIDATE` (default: false)
* `ATL_DB_ACQUIREINCREMENT` (default: 1)
* `ATL_DB_VALIDATIONQUERY` (default: "select 1")
+* `ATL_DB_PROVIDER_CLASS` (default: `com.atlassian.confluence.impl.hibernate.DelegatingHikariConnectionProvider`)
## Data Center configuration
diff --git a/config/confluence.cfg.xml.j2 b/config/confluence.cfg.xml.j2
index 232dd8a..f293613 100644
--- a/config/confluence.cfg.xml.j2
+++ b/config/confluence.cfg.xml.j2
@@ -45,6 +45,7 @@
{{ atl_db_poolmaxsize | default('100') }}
{{ atl_db_poolminsize | default('20') }}
true
+ {{ atl_db_provider_class | default('com.atlassian.confluence.impl.hibernate.DelegatingHikariConnectionProvider') }}
{% endif %}
{% endif %}
diff --git a/tests/test_image.py b/tests/test_image.py
index 524b9df..4cc80d4 100644
--- a/tests/test_image.py
+++ b/tests/test_image.py
@@ -284,7 +284,7 @@ def test_confluence_xml_postgres(docker_cli, image, run_user):
assert xml.findall('.//property[@name="hibernate.hikari.maximumPoolSize"]')[0].text == "100"
assert xml.findall('.//property[@name="hibernate.hikari.minimumIdle"]')[0].text == "20"
assert xml.findall('.//property[@name="hibernate.hikari.registerMbeans"]')[0].text == "true"
-
+ assert xml.findall('.//property[@name="hibernate.connection.provider_class"]')[0].text == "com.atlassian.confluence.impl.hibernate.DelegatingHikariConnectionProvider"
def test_confluence_xml_postgres_all_set(docker_cli, image, run_user):
environment = {
@@ -295,6 +295,7 @@ def test_confluence_xml_postgres_all_set(docker_cli, image, run_user):
'ATL_DB_POOLMAXSIZE': 'x100',
'ATL_DB_POOLMINSIZE': 'x20',
'ATL_DB_TIMEOUT': '40',
+ 'ATL_DB_PROVIDER_CLASS': 'com.example.class',
}
container = run_image(docker_cli, image, user=run_user, environment=environment)
_jvm = wait_for_proc(container, get_bootstrap_proc(container))
@@ -305,6 +306,7 @@ def test_confluence_xml_postgres_all_set(docker_cli, image, run_user):
assert xml.findall('.//property[@name="hibernate.hikari.idleTimeout"]')[0].text == "40000"
assert xml.findall('.//property[@name="hibernate.hikari.maximumPoolSize"]')[0].text == "x100"
assert xml.findall('.//property[@name="hibernate.hikari.minimumIdle"]')[0].text == "x20"
+ assert xml.findall('.//property[@name="hibernate.connection.provider_class"]')[0].text == "com.example.class"
@@ -553,6 +555,7 @@ expected_db_properties = {
'hibernate.hikari.registerMbeans': 'true',
'hibernate.hikari.maximumPoolSize': '100',
'hibernate.hikari.minimumIdle': '20',
+ 'hibernate.connection.provider_class': 'com.atlassian.confluence.impl.hibernate.DelegatingHikariConnectionProvider',
},
'c3p0': {
'hibernate.c3p0.min_size': '20',