codahale/dropwizard — pull request #176 by adamkaplan (2012-09-06 17:18:26+00:00)
Title: Support for alternate database connection pools

This minor change removes the Tomcat DBCP dependency from the Database class without losing any functionality. This will allow users to substitute another database pooling provider if they chose to do so.

Background:
DBCP is causing problems in our staging environments at Gilt since it doesn't seems to be gracefully handling the instability (database, network, etc) in our test systems. We use C3P0 for all of our services here, and it seems to be working far better with dropwizard-db and our systems compared to DBCP.

I also have a C3P0DatabaseFactory class which is able to fully configure an instance of C3P0 using the existing DatabaseConfiguration class. I can also provide that as a helpful companion to this change if you'd like.