0
votes

In my application, I need to configure 2 databases during start up. They are created as Tomcat JDBC pools - org.apache.tomcat.jdbc.pool with seperate pool properties. If I configure such that both the database URLs, user name and password are same i.e., both point to the same database server, then how will be the connection pool created? Will it create 2 pools with different properties or only one? If its only one, which pool properties will be set to the pool - the one which is first created or the next? Also please suggest if there is any tool which can be used to see the connections to a database and the pools created on it?

1

1 Answers

0
votes

My guess is that they would create two separate pools. You can check the SQL server for the "active connections" which the pool should keep a few alive.

My suggestion though, is to use HikariCP as your connection pool. I've found it to be the most robust (survives even if the SQL server goes down) and the fastest (lightest, and smallest lib).