commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] Commented: (DBCP-343) RemoveAbandoned setting closes the active connection.
Date Mon, 13 Sep 2010 10:48:34 GMT


Sebb commented on DBCP-343:

Meanwhile, ISTM that the current Javadoc could/should be updated to clarify the behaviour
with long-running queries, i.e. what constitutes an "idle" connection.

The use of the word "idle" is misleading, as currently it's the age of the DelegatingStatement
object that is compared with the timeout.

As to improving the behaviour: maybe checkOpen() should update the start time as well? This
would not fix the problem entirely, but could help.

> RemoveAbandoned setting closes the active connection.
> -----------------------------------------------------
>                 Key: DBCP-343
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.4
>         Environment: Linux 64 bit, Ubuntu 5.*
>            Reporter: Singaravelu Suburayan
>            Priority: Blocker
>             Fix For: 2.0
> The documentation says, RemoveAbandoned connection setting will remove only the connections
that are idle for the configured timeout. But I see it is closing the connections that are
> The logic in DBCP implementatoin shows that it calculate the idle time from the time
of the connection is created, irrespective of the connection is used. So it just close the
connection in removeAbandonedTimeout.
> In my code, I'm reusing the connection for more DB statements to do intensive db operations,
which hold the connection for more than 5 minutes . The connection will never be idle for
more than a few seconds.
> My setting of removeabandonedTimeout = 300 brutally closes the connection in 5 minutes,
without checking if the connection is in use or not.
> I assume it should involve the activity of the statement object also to do the idle time
> thanks,
> Sing

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message