commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31569] New: - Dbcp doesn't meet JDBC specification
Date Wed, 06 Oct 2004 21:52:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31569>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31569

Dbcp doesn't meet JDBC specification

           Summary: Dbcp doesn't meet JDBC specification
           Product: Commons
           Version: 2.1 Final
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Dbcp
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: rlenard@avaya.com


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.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message