Fork me on GitHub

Naming input please! I'm adding a feature to next.jdbc that makes it easier to create connection pooled datasources. You'll be able to provide a db-spec (hash map) and a connection pooled datasource class name com.zaxxer.hikari.HikariDataSource or com.mchange.v2.c3p0.ComboPooledDataSource for example, and it will build the JDBC URL, create the datasource class, call .setJdbcUrl on it, and set other parameters based on whatever else is in the hash map, using My first thought is to put this new function in next.jdbc.connection (because that's where all the db-spec -> URL logic is) but a) I don't know what to call it and b) I'm not sure if that's the best place for it. Thoughts?


next.jdbc.connection/->pool ?


Also, are there any other connection pool libraries that folks are commonly using?


I know of BoneCP (tried it once, had problems, haven't tried it since -- looks like the last release was six years ago now so maybe it's no longer maintained or used?).


@ghadi Yup, I mentioned both HikariCP and c3p0 above -- I have tests in next.jdbc already for both of those.


Looking at Apache DBCP -- seems to be actively maintained but I don't hear it mentioned much? And it uses .setUrl instead of .setJdbcUrl... sigh


And it doesn’t publish releases to Maven 😞


The Tomcat DBCP seems to be the more widely used, updated version of Apache DBCP. At least it's published to Maven (and it also uses .setUrl instead of .setJdbcUrl)


I suspect Hikari and c3p0 are the two most widely used and they're easy to support so maybe that's all I'll bother with out of the box. Just read that the author of BoneCP considers it deprecated and refers everyone to HikariCP instead.

👍 4