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] - [dbcp] Dbcp doesn't meet JDBC specification
Date Tue, 07 Dec 2004 21:44:10 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





------- Additional Comments From rlenard@avaya.com  2004-12-07 22:44 -------
(In reply to comment #1)
> The JDBC Spec says indeed that those resources will be automatically closed 
> when garbag collected.  It doesn't say when they can be garbage collected, 
nor 
> does it place restrictions on implementations to garbage collect after 
> executing SQL.  So DBCP is not in violation of the Spec by a long shot.

It also says 
"A ResultSet object is automatically closed when the Statement object that 
generated it is closed, re-executed, or used to retrieve the next result from a 
sequence of multiple results."

and close says
"Releases this ResultSet object's database and JDBC resources immediately 
instead of waiting for this to happen when it is automatically closed."

Which is pretty clear that they should be release immediately - which DBCP 
doesn't do.

> Accordingly, I'm changing this into an enhancement request.  If you want to 
> increase the probability of it being done any time soon, submit a patch.

I think you might have been a little hasty here - for the reason above.

> item will become moot.  Second, the best practice for JDBC resource handling 
is 
> to explicitly close what you don't need.  People who write code as you 
> illustrate above are not following that practice and don't deserve much 
> sympathy.

No argument here, except that "naive" users will use DBCP and *NOT* get the 
behaviour they expect !!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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