ibdknox/Korma — Issue #45: Provide a way to use alternate connection pool
Author: jsyrjala
Created: 2012-02-18 23:07:09+00:00
State: open

Currently korma uses automatically c3p0 connection pool and there doesn't seem to be disable that.

My software already has a configured connection pool and I'd like to use that, but korma creates a new one. Also the c3p0 uses default minPoolSize 3, so korma will use at least 3 connections.

https://github.com/ibdknox/Korma/blob/master/src/korma/db.clj

The preferred solution would be that defdb can get the datasource as paramter and korma would use that without wrapping it to c3p0 connection pool. For example:

(defdb db (postgres {:datasource (create-my-connection-pool db-spec)} ))