commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DBCP-180) [dbcp] Dbcp doesn't meet JDBC specification
Date Tue, 15 Apr 2014 10:10:16 GMT

    [ https://issues.apache.org/jira/browse/DBCP-180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13892672#comment-13892672
] 

Sebb edited comment on DBCP-180 at 4/15/14 10:10 AM:
-----------------------------------------------------

The issues that led to AbandonedTrace being deprecated were fixed and the deprecation removed.

I have fixed this in DBCP 2 by using a WeakReference within AbandonedTrace.


was (Author: markt):
The issues that led to AbandonedTrace being deprecated were fixed and the deprecation removed.

I have fixed this in DBCP 2 by using a WekaReference within AbandonedTrace.

> [dbcp] Dbcp doesn't meet JDBC specification
> -------------------------------------------
>
>                 Key: DBCP-180
>                 URL: https://issues.apache.org/jira/browse/DBCP-180
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2
>         Environment: Operating System: other
> Platform: All
>            Reporter: Rohan Lenard
>            Priority: Minor
>             Fix For: 2.0
>
>
> The JDBC specification says for ResultSet and Statement that the ResultSet and 
> Statement will be automatically closed when garbage collected.
> This means that people often write code like this
> Connection.getStatement().executeSQL("....");
> However, because the DelegateConnection/DelegateStatement/DelegateResultSet 
> extend AbandonedTrace (and are linked into the abandoned trace mechanism) they 
> will not be garbage collected until the connection is closed.
> This of course means that DBCP holds on to lots of memory that it shouldn't do 
> (I've had people complain to me of memory leaks).
> Surely it's possible to make the DelegateXX hold onto something else which does 
> the AbandonedTrace and so when it is released it can do the implicit close and 
> then everything will be coool.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message