karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Soto <alex.s...@envieta.com>
Subject Re: pax-jdbc-config connection pool configuration
Date Tue, 15 May 2018 12:55:58 GMT
I am requesting the access to create the issue. 

Using “pool” does not work either.

In the mean time, which Pool should I use?, I looked at Hikari, but I see a comment that says:
 “XA datasources are not supported.”


Best regards,
Alex soto




> On May 15, 2018, at 2:37 AM, Christian Schneider <chris@die-schneider.net> wrote:
> 
> The docs indeed show to use jdbc.pool.maxTotal but in the code I see that the pool properties
are filtered using "pool." 
> 
> See:
> https://github.com/ops4j/org.ops4j.pax.jdbc/blob/master/pax-jdbc-pool-dbcp2/src/main/java/org/ops4j/pax/jdbc/pool/dbcp2/impl/DbcpPooledDataSourceFactory.java
<https://github.com/ops4j/org.ops4j.pax.jdbc/blob/master/pax-jdbc-pool-dbcp2/src/main/java/org/ops4j/pax/jdbc/pool/dbcp2/impl/DbcpPooledDataSourceFactory.java>
> 
> So can you try with pool.maxTotal? Still this is a bug - either the docs or the code
is wrong.
> 
> You can find the link to the issue tracker on the top level of the code base in the README:
> https://github.com/ops4j/org.ops4j.pax.jdbc <https://github.com/ops4j/org.ops4j.pax.jdbc>
> 
> Be aware though that you need to ask for a jira user on the ops4j list (ops4j@googlegroups.com
<http://googlegroups.com/>) first. 
> The self registration is switched off as there was lots of spam.
> 
> Christian
> 
> 
> 2018-05-14 21:47 GMT+02:00 Alex Soto <alex.soto@envieta.com <mailto:alex.soto@envieta.com>>:
> Using Karaf  4.2.0, I am trying to configure connection pool using pax-jdbc-config  approach.
 I installed features:
> 
> pax-jdbc-mariadb
> pax-jdbc-config
> pax-jdbc-pool-dbcp2
> 
> 
> 
> I dropped a org.ops4j.datasource-responder.cfg file in the etc directory:
> 
> osgi.jdbc.driver.name <http://osgi.jdbc.driver.name/> = mariadb
> dataSourceName=responder
> url = jdbc:mariadb://localhost:3306/responder <>
> user=XXXX
> password=XXXX
> pool=dbcp2
> xa=true
> databaseName=responder
> jdbc.pool.maxTotal=8
> 
> 
> The last line causes this error:
> 
> cannot set properties [pool.maxTotal]
> java.sql.SQLException: cannot set properties [pool.maxTotal]
> 	at org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.setProperties(MariaDbDataSourceFactory.java:70)
~[?:?]
> 	at org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.createDataSource(MariaDbDataSourceFactory.java:36)
~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.createDs(DataSourceRegistration.java:134)
~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.<init>(DataSourceRegistration.java:80)
~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$0(DataSourceConfigManager.java:81)
~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
~[?:?]
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
~[?:?]
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
~[?:?]
> 	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
> 	at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183) ~[?:?]
> 	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318) ~[?:?]
> 	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261) ~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$1(DataSourceConfigManager.java:77)
~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146)
~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$2(DataSourceConfigManager.java:76)
~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
~[?:?]
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
~[?:?]
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
~[?:?]
> 	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
> 	at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183) ~[?:?]
> 	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318) ~[?:?]
> 	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261) ~[?:?]
> 	at org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
~[14:org.ops4j.pax.jdbc.config:1.2.0]
> 	at org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
~[14:org.ops4j.pax.jdbc.config:1.2.0]
> 	at org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$updated$3(DataSourceConfigManager.java:75)
~[14:org.ops4j.pax.jdbc.config:1.2.0]
> 	at org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146)
[14:org.ops4j.pax.jdbc.config:1.2.0]
> 	at org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
[14:org.ops4j.pax.jdbc.config:1.2.0]
> 	at org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.updated(DataSourceConfigManager.java:74)
[14:org.ops4j.pax.jdbc.config:1.2.0]
> 	at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)
[8:org.apache.felix.configadmin:1.8.16]
> 	at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)
[8:org.apache.felix.configadmin:1.8.16]
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1792)
[8:org.apache.felix.configadmin:1.8.16]
> 	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
> 	at java.lang.Thread.run(Thread.java:748) [?:?]
> 
> 
> How do I configure the various parameters of the connection pool?
> 
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
> 
> 
> 
> -- 
> -- 
> Christian Schneider
> http://www.liquid-reality.de <http://www.liquid-reality.de/>
> 
> Computer Scientist
> http://www.adobe.com <http://www.adobe.com/>
> 


Mime
View raw message