Hi, There is some examples on the PaxJDBC wiki where they mentioned a "jdbc.pool" prefix :
https://ops4j1.jira.com/wiki/spaces/PAXJDBC/pages/119078914/Pooling+and+XA+support+in+1.0.0 regards, François Papon fpa...@apache.org Le 10/09/2018 à 17:46, Jean-Baptiste Onofré a écrit : > It looks good to me as you should have a configuration with the pool > configuration right (ManagedServiceFactory) ? > > Regards > JB > > On 10/09/2018 15:37, Erwin Hogeweg wrote: >> >>> On Sep 10, 2018, at 09:33, Jean-Baptiste Onofré <j...@nanthrax.net >>> <mailto:j...@nanthrax.net>> wrote: >>> >>> What's the output of bundle:services -p 86 ? >> *karaf*@root()> bundle:services-p 86 >> >> >> >> OPS4J Pax JDBC Pooling DBCP2 (86) provides: >> ------------------------------------------- >> objectClass = [org.ops4j.pax.jdbc.pool.common.PooledDataSourceFactory] >> pool = dbcp2 >> service.bundleid = 86 >> service.id <http://service.id> = 267 >> service.scope = singleton >> xa = false >> ---- >> objectClass = [org.ops4j.pax.jdbc.pool.common.PooledDataSourceFactory] >> pool = dbcp2 >> service.bundleid = 86 >> service.id <http://service.id> = 310 >> service.scope = singleton >> xa = true >> *karaf*@root()> >> >> >> >>> All pool properties are not as service properties, they are only config >>> properties. >>> >>> Regards >>> JB >>> >>> On 10/09/2018 15:23, Erwin Hogeweg wrote: >>>> 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/> <http://service.id >>>>>> <http://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/> <http://service.id >>>>>> <http://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/> <http://service.id >>>>>> <http://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/> <http://service.id >>>>>> <http://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/> <http://service.id >>>>>> <http://service.id/>> <http://service.id/> = 116 >>>>>> service.scope = singleton >>>>>> xa = true >>>>>> Provided by : >>>>>> OPS4J Pax JDBC Pooling DBCP2 (86) >>>>>> >>>>>> *karaf*@root()> >>>>>> >>>>>> >>>>>> >>>>> -- >>>>> Jean-Baptiste Onofré >>>>> jbono...@apache.org >>>>> <mailto:jbono...@apache.org> <mailto:jbono...@apache.org> >>>>> http://blog.nanthrax.net <http://blog.nanthrax.net/> >>>>> Talend - http://www.talend.com <http://www.talend.com/> >>> -- >>> Jean-Baptiste Onofré >>> jbono...@apache.org <mailto:jbono...@apache.org> >>> http://blog.nanthrax.net <http://blog.nanthrax.net/> >>> Talend - http://www.talend.com <http://www.talend.com/>