korma/Korma — pull request #239 by jmglov (2014-06-12 12:41:46+00:00)
Title: Don't override C3P0 system properties with defaults

Korma gives you a way to configure C3P0's [ComboPooledDataSource](http://www.mchange.com/projects/c3p0/apidocs/com/mchange/v2/c3p0/ComboPooledDataSource.html), but only sets a handful of the configurable parameters. C3P0 has a set of [configuration properties](http://www.mchange.com/projects/c3p0/#configuration_properties) that ComboPooledDataSource will use as defaults.

The issue is that Korma also applies defaults, in [korma.db/connection-pool](https://github.com/korma/Korma/blob/f66404cdc8abfc4614532eb2fb83780786f933cb/src/korma/db.clj#L18), which override the system properties that your app may have set.

As such, when your application wants to configure the pool at runtime, using a mix of some of the configuration that has Korma defaults and some that does not, it needs to include some logic for adding the Korma-controlled config into the database spec for the subset of system properties that Korma would otherwise effectively overwrite.

This patch makes Korma use C3P0 configuration properties, then fall back to its own defaults.