On 1/15/19 2:59 PM, Matt Sicker wrote:
One idea might be to invoke a crafted query for your connection check
that fails every so often so it'll be forced to reconnect, though I
haven't tried that before.
I was thinking the same thing. I am not sure how to do it, but I
vaguely recall it being possible to get information about an Oracle
session via SQL query. If your validation query could check when
the connection was established it could fail if it was too old.
Validation failures cause connections to be closed and subsequent
borrows will cause new ones to be created. You could set this up
using either testOnBorrow or testOnReturn (or both).
Of course, the best is to upgrade to DBCP 2 where the connection
lifetime property you want is directly available.
Phil
On Tue, 15 Jan 2019 at 14:39, RAJIV S <[email protected]> wrote:
Hi Team,
In DBCP 1.4 is there any property which can help to disconnect and
reconnect DB connection with in some specified time ?
Actually , We are using DBCP 1.4 version in our application. It's a
standalone Java processor code , developer some years ago, works well till
now.
Recently we encounter a problem that Oracle SWAM memory grows continuously
due to high usage . DBAs suggested to disconnect and reconnect db
connection from this java application with some specified time.
I am unable to find relevant property or documentation help.
Please someone help me if anyone knows how do deal this situation.
--
Regards,
Rajiv.S
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]