Is this example from the Lacinia tutorial (https://lacinia.readthedocs.io/en/latest/tutorial/database-1.html)
(defn ^:private pooled-data-source
[host dbname user password port]
{:datasource
(doto (ComboPooledDataSource.)
(.setDriverClass "org.postgresql.Driver" )
(.setJdbcUrl (str "jdbc:postgresql://" host ":" port "/" dbname))
(.setUser user)
(.setPassword password))})
production ready?Using the c3po connection pool https://www.mchange.com/projects/c3p0/#using_combopooleddatasource
I noticed it only makes one connection with the database
When using Hikari I immediately see 10 connections
But maybe c3po works different
Thanks
Anything specific you have doubts about? Jdbc-next has support for a pooled data source baked in and is more future proof. But apart from that I don't see anything strange.
You could try #sql jdbc.next supports both https://github.com/seancorfield/next-jdbc/blob/master/doc/getting-started.md#connection-pooling I don't know the differences, but did see the same behaviour using hikari.