From e99ea49121140f4b5271df40c9dee7349c55b6ae Mon Sep 17 00:00:00 2001 From: Simon Redfern Date: Wed, 8 Nov 2023 09:32:17 +0100 Subject: [PATCH] Setting HirakiCP default autoCommit to false --- obp-api/src/main/scala/bootstrap/liftweb/CustomDBVendor.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obp-api/src/main/scala/bootstrap/liftweb/CustomDBVendor.scala b/obp-api/src/main/scala/bootstrap/liftweb/CustomDBVendor.scala index 0365acd6b0..cf39b0dfd1 100644 --- a/obp-api/src/main/scala/bootstrap/liftweb/CustomDBVendor.scala +++ b/obp-api/src/main/scala/bootstrap/liftweb/CustomDBVendor.scala @@ -50,7 +50,7 @@ class CustomDBVendor(driverName: String, config.setMaxLifetime(maxLifetime.head) } //Liftweb DB.scala will set all the new connections to false, so here we set default to false - Hmm, check this comment! - val autoCommitValue: Boolean = true + val autoCommitValue: Boolean = false config.setAutoCommit(autoCommitValue) logger.info(s"We set HikariDatasource config.setAutoCommit=$autoCommitValue") logger.info(s"Note: HirakiCP will reset any connection to autoCommit=$autoCommitValue when it returns it to the pool if it has been otherwise set in code. (This can cause further debug messages and some performance impact.)")