Christian,

The code reference you sent along looks correct, at least based on my 
understanding of configuring Hikari, so perhaps there is some issue with Hikari 
itself? Will the next version of Pax JDBC use the newest version of Hikari 
(which I think is 2.7.3 or something like that?).

In my log file, I get the following, which would seem to indicate that the 
Hikari configuration properties aren’t being used. I previously thought that 
just the one config was being ignored but now I realize none are being used.

HikariDataSource                 | 143 - com.zaxxer.HikariCP - 2.4.1 | 
HikariPool-0 - is starting

Prior to using Pax, I was using Blueprint to create my datasources, during 
which time I would see the proper pool name “Composite Enterprise Data“ in the 
log.

Scott

From: cschneider...@gmail.com [mailto:cschneider...@gmail.com] On Behalf Of 
Christian Schneider
Sent: Tuesday, November 21, 2017 6:22 AM
To: user@karaf.apache.org
Subject: Re: Pax JDBC DataSourceFactory connection pooling config

When I look into the source I see that the hikari pooling checks for the prefix 
"hikari.". Maybe you can set a breakpoint there and check what it actually does.

See: 
https://github.com/ops4j/org.ops4j.pax.jdbc/blob/master/pax-jdbc-pool-hikaricp/src/main/java/org/ops4j/pax/jdbc/pool/hikaricp/impl/HikariPooledDataSourceFactory.java

Christian

2017-11-20 22:47 GMT+01:00 Leschke, Scott 
<slesc...@medline.com<mailto:slesc...@medline.com>>:
How does one configure the underlying connection pool when using Pax JDBC 
DataSourceFactory?  I’ve been using this for a while and recently discovered 
it’s not behaving as I intended. I’m using Hikari as my CP, and want to 
configure the following Hikari properties:

poolName
maximumPoolSize
minimumIdle
idleTimeout
maxLifetime

I’ve been prefixing each of these “hikari.” (which I concluded was the proper 
way to do it some months ago), but it appears that Hikari is using defaults.
When I configure as follows,

hikari.poolName        = Composite Enterprise Data
hikari.maximumPoolSize = 1
hikari.minimumIdle     = 0
hikari.idleTimeout     = 28800000
hikari.maxLifetime     = 0

I immediately get 10 connections to the datastore, even before a connection is 
actually requested to run a query (Cisco Information Server (aka, Composite)).
This would be the default behavior if none of the above get used.  I also tried 
prefixing with “pool.” btw (which makes more sense to me), but get the same 
behavior.

Scott



--
--
Christian Schneider
http://www.liquid-reality.de<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

Reply via email to