Migrate C3P0 config settings to c3p0.properties file
As per configuration_precedence document noted in the c3p0 config doc (https://www.mchange.com/projects/c3p0/#configuration_precedence) any setting which is specified programatically may not be overridden by other external settings such as system properties. This creates an issue if an admin wishes to set any of these settings. In my case I was attempting to have c3p0 shut down all connections to my RDS instance so that amazon would spin the instance down while not in use. Alas it appears that something else seems to re-establish connectinons every few seconds and prevent my desired behavior. But before I abondon this approach I figured this would be a good PR for the project as it will enable others to set this settings as they see fit and not hit the same roadblocks I hit along the way. Of note I have removed the maxPoolSize setting as the current value of 15 is the same as the driver default. The other settings remain.
Please register or sign in to comment