Spring Boot Database Connection Pool

December 20, 2019 Joe

The Spring Boot looks up the classpath for the presence of any of the aforementioned connection pool implementations.

By default, Spring Boot uses HikariCP for the obvious reason which includes performance if found in the classpath. But falls back to Tomcat JDBC in the absence of HikarCP if Tomcat JDBC is present in the classpath.

Finally, in the absence of HikariCP and Tomcat JDBC, Spring Boot will choose Apache DBCP2 if present in the classpath.

To signal to Spring Boot our choice of connection pool implementation to use we need to do the following;

Read More..

Database Connection Pool in Spring

December 19, 2019 Joe

For most enterprise database intense application, the cost of creating new database connection, the network traffic will impact on the overall performance of the application without employing a database connection pooling pattern.

Database Connection pooling is a pattern used by software applications to connect to databases using already created set of reusable connection objects. The connection pool acts as a cache of the open database connections.

Read More..