In out app we use Apache DBCP
connector for Oracle DB
. But every 30 or 40 minutes we get connection size leak error.
Is there any way to close all connections from pool before app is exit?
e.g. write a method, which can get close event and in that method we can close connections safely.
In mysql there is a way to provide a timeout for sleeping connections (connections not closed properly). This helps a lot in cases where connections leak due to application not closing the connections properly.
There should be an alternative for the same in oracle as well.