Fabricio, I just found an answer in Karaf 4.2.8. Setting pool.timeBetweenEvictionRunsMillis will cause pool.minIdle to be honored.
*** * etc/etc/org.ops4j.datasource-xxx.cfg *** pool.timeBetweenEvictionRunsMillis=5000 pool.minIdle=3 Paul Spencer > On Jan 13, 2020, at 9:11 AM, Fabricio Guimaraes Pellegrini > <[email protected]> wrote: > > Hello guys, > > First of all, apologize me if this question doesn’t belong here. > > Right now we are using Apache Karaf 4.1.4 and Pax JDBC to connect to an > Oracle Database, and for legacy reason, I need to configure the initial size > of my JDBC pool to the same value as pool.maxTotal, but I can’t figure out > how to do it properly. > > In Oracle Weblogic, for example, I can find such configuration in the > “advanced configuration” of a JDBC Pool Configuration. > > However, searching on the PAX JDBC Wiki there isn’t a option available, even > if the Apache DBCP provides such capability trough BasicDataSource.java. > > I looked into the DbcpPooledDataSourceFactory.java to try to understand how > it builds the datasources and if there would be another way besides the > “pool” and “factory” prefixes, but no lucky either. > > Am I missing something? > > This is what I’m using: > > ebldadm@karaf=>list | grep JDBC > 198 │ Active │ 80 │ 1.4.0 │ OPS4J Pax JDBC Config > 199 │ Active │ 80 │ 1.4.0 │ OPS4J Pax JDBC Oracle Driver Adapter > 200 │ Active │ 80 │ 1.4.0 │ OPS4J Pax JDBC Pooling Support Base > 201 │ Active │ 80 │ 1.4.0 │ OPS4J Pax JDBC Pooling DBCP2 > > #What we have configured at org.ops4j.datasource-fasdp23.cfg > osgi.jdbc.driver.class=oracle.jdbc.OracleDriver > osgi.jdbc.driver.name=oracle > pool=dbcp2 > xa=false > url=jdbc:oracle:thin:@fasdp21:1521/${FAsdp2x.sid} > user=${user} > password=ENC(${password},myEnc) > dataSourceName=FASDP23 > pool.maxTotal=2 > pool.testOnBorrow=true > pool.testWhileIdle=true > > Thanks, > > Fabricio Pellegrini
