I'm workin on an application deployed on karaf 4.2.9 and I'm using org.ops4j.pax.jdbc-1.4.4.
osgi.jdbc.driver.name=mariadb
url=jdbc:mariadb://dbprimary:3306/gg_caibizdata?autoReconnect=true
user= xxxxxx
password=xxxxxx
dataSourceName=caibizdata
pool=dbcp2
jdbc.pool.maxTotal=100
jdbc.pool.maxIdle=7
jdbc.pool.maxWaitMillis=10000
xa=true
jdbc.factory.validationQuery="/* ping */ SELECT 1"
When karaf starts it doesn't create the connection, only when used for the first time using ds-list or by some bundle the connection is instantiated.
After some time, when every connection goes idle no other connection is created and if a bundle try to get a connection it receives a connection timeout, then if it tries another time everything goes well.
I've tried to set a minimum number of connections, bat i'ven't found the right property.
I've also tried to change the configuration using something like this