Wait for database with mariadb connector 99/12399/1
authoreh552t <eh552t@intl.att.com>
Thu, 14 Sep 2017 09:14:02 +0000 (11:14 +0200)
committereh552t <eh552t@intl.att.com>
Thu, 14 Sep 2017 09:14:12 +0000 (11:14 +0200)
With the change from Mysql to MariaDB connector
maxReconnect parameter doesn't work anymore.
We then need to use retriesAllDown instead but
this is doing retries as fast as possible with
no wait between tries so need an arbitrary high
value. With maxReconnect it was waiting a time
exponentially growing so a low value was enough.

Change-Id: Id1429759aa4bdcfc9af1934fd6f8b848ed879e91
Signed-off-by: eh552t <eh552t@intl.att.com>
Issue-ID: CLAMP-42

extra/docker/clamp/clamp.env
src/main/resources/application.properties

index d9ced6f..e5936e3 100644 (file)
@@ -1 +1 @@
-SPRING_APPLICATION_JSON={"spring.datasource.camunda.url":"jdbc:mariadb://db:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100","spring.datasource.cldsdb.url":"jdbc:mariadb://db:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100"}
\ No newline at end of file
+SPRING_APPLICATION_JSON={"spring.datasource.camunda.url":"jdbc:mariadb:sequential://db:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647","spring.datasource.cldsdb.url":"jdbc:mariadb:sequential://db:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647"}
\ No newline at end of file
index 78ab0c6..42aad2d 100644 (file)
@@ -94,7 +94,7 @@ kubernetes.namespace=com-att-ajsc
 #server.port=0\r
 #Camunda Process Engine DataSource connection Details\r
 spring.datasource.camunda.driverClassName=org.mariadb.jdbc.Driver\r
-spring.datasource.camunda.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/camundabpm?autoReconnect=true\r
+spring.datasource.camunda.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/camundabpm?autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647\r
 spring.datasource.camunda.username=camunda\r
 spring.datasource.camunda.password=ndMSpw4CAM\r
 spring.datasource.camunda.validationQuery=SELECT 1\r
@@ -115,7 +115,7 @@ camunda.bpm.database.schema-update=false
 \r
 #clds datasource connection details\r
 spring.datasource.cldsdb.driverClassName=org.mariadb.jdbc.Driver\r
-spring.datasource.cldsdb.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/cldsdb4?autoReconnect=true\r
+spring.datasource.cldsdb.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/cldsdb4?autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647\r
 spring.datasource.cldsdb.username=clds\r
 spring.datasource.cldsdb.password=sidnnd83K\r
 spring.datasource.cldsdb.validationQuery=SELECT 1\r