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<https://ops4j1.jira.com/wiki/spaces/PAXJDBC/pages/119078914/Pooling+and+XA+support+in+1.0.0>
 there isn't a option available, even if the Apache DBCP provides such 
capability<https://commons.apache.org/proper/commons-dbcp/configuration.html> 
trough 
BasicDataSource.java<https://github.com/apache/commons-dbcp/blob/master/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java>.

I looked into the  
DbcpPooledDataSourceFactory.java<https://github.com/ops4j/org.ops4j.pax.jdbc/blob/jdbc-1.4.0/pax-jdbc-pool-narayana/src/main/java/org/ops4j/pax/jdbc/pool/narayana/impl/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

Reply via email to