Reusing JDBC connections after a while

I have an application using an Oracle RAC database. In order to perform maintenance tasks on database nodes, I would like to transfer all connections from node 1 database, then disconnect node for maintenance.

I would like to make sure that the database connections do not remain open for more than X minutes. When a DB node is put into maintenance, connections opened on this node will be closed after no more than X minutes and recreated on another.

The connection pool used is common-dbcp, with the intention of switching to tomcat-jdbc. For both pools, I do not see the configuration option to force reuse of connections after some time. Am I missing something? Or is this not a standard option?

+4
source share
1 answer

Looking at the tomcat-jdbc documentation , I can see that there is a maxAge parameter that does almost what I need. I will conduct some checks next week to confirm and update this answer to reflect my findings.

+2
source

Source: https://habr.com/ru/post/1399195/


All Articles