Again, I can recommend the OSGi Transaction Control service. The Aries implementation has support for configuration defined resources, which make connection and pooling configuration extremely easy. See http://aries.apache.org/modules/tx-control/localJDBC.html#creating-a-resource-using-a-factory-configuration <http://aries.apache.org/modules/tx-control/localJDBC.html#creating-a-resource-using-a-factory-configuration> for details.
The Aries Transaction Control implementation also has support for XA transactions if that’s of interest to you. Best Regards, Tim Ward Author, Enterprise OSGi in Action https://www.manning.com/cummins <https://www.manning.com/cummins> > On 1 Mar 2017, at 08:11, schmke <ktschm...@gmail.com> wrote: > > I too am trying out the HikariCP pooling and haven't figured out how to > change/specify pool settings. > > I have a .cfg file that creates a pooled data source just fine, with TRACE > logging on I see HikariCP initializing and all the default settings. And > the pool is used as I use the data source. > > But when I try to specify pooling configuration in the .cfg file, the > property I set is passed on to the underlying data source factory, not the > pool. For example, I want to set the minimumIdle to 5 rather than the > default 10. > > If I specify pool.minimumIdle=5 I see this in the log: > > 2017-03-01T00:08:13,848 | WARN | CM Configuration Updater > (ManagedServiceFactory Update: factoryPid=[org.ops4j.datasource]) | > DataSourceRegistration | 76 - org.ops4j.pax.jdbc.config - 1.0.1 | > cannot set properties [pool.minimumIdle] > java.sql.SQLException: cannot set properties [pool.minimumIdle] > at > org.ops4j.pax.jdbc.mysql.impl.MysqlDataSourceFactory.setProperties(MysqlDataSourceFactory.java:71) > [77:org.ops4j.pax.jdbc.mysql:1.0.1] > > If I instead specify jdbc.pool.minimumIdle=5, the same thing: > > 2017-03-01T00:09:04,034 | WARN | CM Configuration Updater > (ManagedServiceFactory Update: factoryPid=[org.ops4j.datasource]) | > DataSourceRegistration | 76 - org.ops4j.pax.jdbc.config - 1.0.1 | > cannot set properties [pool.minimumIdle] > java.sql.SQLException: cannot set properties [pool.minimumIdle] > at > org.ops4j.pax.jdbc.mysql.impl.MysqlDataSourceFactory.setProperties(MysqlDataSourceFactory.java:71) > [77:org.ops4j.pax.jdbc.mysql:1.0.1] > > So how are the properties to be specified so they get passed to the pool and > not the underlying JDBC data source? > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/PAX-JDBC-1-0-1-pools-tp4049649p4049697.html > Sent from the Karaf - User mailing list archive at Nabble.com.