Thanks JB, > The pool uses "pool." prefix in the config. > > So pool.maxTotal is a valid configuration in DBCP, pool.dummy is another one. That is what I thought, but those properties don’t show up in the PooledDataSourceFactory (see below). Is that expected?
Thanks, Erwin >> [javax.sql.DataSource] >> ——————————— >> … >> pool.maxIdle = 25 >> pool.maxTotal = 8 >> [org.ops4j.pax.jdbc.pool.common.PooledDataSourceFactory] >> -------------------------------------------------------- >> pool = dbcp2 >> service.bundleid = 86 >> service.id <http://service.id/> = 113 >> service.scope = singleton >> xa = false >> Provided by : >> OPS4J Pax JDBC Pooling DBCP2 (86) >> Used by: >> OPS4J Pax JDBC Config (16) >> >> [org.ops4j.pax.jdbc.pool.common.PooledDataSourceFactory] >> -------------------------------------------------------- >> pool = dbcp2 >> service.bundleid = 86 >> service.id <http://service.id/> = 116 >> service.scope = singleton >> xa = true >> Provided by : >> OPS4J Pax JDBC Pooling DBCP2 (86) > > You can use any DBCP configuration as soon as you prefix with "pool.": > > maxIdle > maxTotal > maxWaitMillis > testOnBorrow > validationQuery > validationQueryTimeout > > Regards > JB > > On 10/09/2018 14:10, Erwin Hogeweg wrote: >> All - >> >> Is anyone aware of changes in the DB pool configuration parameters in >> 4.2.1? I can’t find any documentation re. that. >> >> The error I received in 4.2.0 is gone, but I can’t figure out how to >> configure the pool. I tried all possible combination of pool. factory. >> and property but none seem to work. >> >> Any pointer to an example or a document would be very much appreciated. >> >> FWIW, This is my datasource .cfg >> >> osgi.jdbc.driver.class=com.mysql.jdbc.Driver >> url=jdbc:mysql://my_db_server:3306/xyz?useSSL=false >> dataSourceName=jdbc/_xyz_ >> user=_user_ >> password=_password_ >> pool=dbcp2 >> xa=false >> >> pool.maxTotal=8 >> pool.maxIdle=25 >> >> And these are the generated services: >> >> *karaf*@root()> service:listDataSource >> >> >> [javax.sql.DataSource] >> ---------------------- >> dataSourceName = jdbc/xyz >> felix.fileinstall.filename = >> file:/Users/erwin/work/Xyz/trunk/src/server/karaf.distro/target/assembly/etc/org.ops4j.datasource-xyz.cfg >> osgi.jdbc.driver.class = com.mysql.jdbc.Driver >> osgi.jndi.service.name = jdbc/xyz >> password = password >> pax.jdbc.managed = true >> pool.maxIdle = 25 >> pool.maxTotal = 8 >> service.bundleid = 16 >> service.factoryPid = org.ops4j.datasource >> service.id <http://service.id/> = 274 >> service.pid = org.ops4j.datasource.7b57f2dc-2d66-40c1-8e0a-4e6b8e4f23da >> service.scope = singleton >> url = jdbc:mysql://my_db_server:3306/xyz?useSSL=false >> user = user >> Provided by : >> OPS4J Pax JDBC Config (16) >> Used by: >> Xyz :: Data Model (190) >> Xyz :: Repository Services Impl. (200) >> >> *karaf*@root()> service:listPooledDataSourceFactory >> [org.ops4j.pax.jdbc.pool.common.PooledDataSourceFactory] >> -------------------------------------------------------- >> pool = dbcp2 >> service.bundleid = 86 >> service.id <http://service.id/> = 113 >> service.scope = singleton >> xa = false >> Provided by : >> OPS4J Pax JDBC Pooling DBCP2 (86) >> Used by: >> OPS4J Pax JDBC Config (16) >> >> [org.ops4j.pax.jdbc.pool.common.PooledDataSourceFactory] >> -------------------------------------------------------- >> pool = dbcp2 >> service.bundleid = 86 >> service.id <http://service.id/> = 116 >> service.scope = singleton >> xa = true >> Provided by : >> OPS4J Pax JDBC Pooling DBCP2 (86) >> >> *karaf*@root()> >> >> > > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com
