Posts

Showing posts from July, 2014

DB Connection Pooling

If you are using DriverManagerDataSource then note: That this class is not an actual connection pool; it does not actually pool Connections. It just serves as simple replacement for a full-blown connection pool, implementing the same standard interface, but creating new Connections on every call. So change the class to:  com.mchange.v2.c3p0.ComboPooledDataSource c3p0 is an easy-to-use library for making traditional JDBC drivers "enterprise-ready" by augmenting them with functionality defined by the jdbc3 spec and the optional extensions to jdbc2. http://www.mchange.com/projects/c3p0/#quickstart You need to include the dependency in your pom.xml as follows,                                <dependency>                               ...