I am facing connection leakage problem with DBCP2.
I went though all the code base and have closed/released the connections wherever required.
I have also run Sonar, but no connection leakages were reported.
Finally I have decide to write a java based executor service which will close or return the DB connections back to the pool periodically. The service should run once in 2 days.
Can someone help with the code to close the connections which are not returned to pool?