commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Egan <re...@ph.com>
Subject RE: DBCP: Closed connections
Date Fri, 25 Apr 2003 18:00:30 GMT
In an effort to muddy the waters more, perhaps some clarification is in
order.

If a Statement, PreparedStatement, or CallableStatement directly produces a
ResultSet (via SELECT) then that result set is closed when the associated
statement is closed.

However, if a result set was produced another way (such as selecting into a
REF CURSOR) then that result set is not closed, at least in the Oracle
driver(s).

Regrettably, while the JDBC 3.0 specification formally addresses the former
case in chapter 13.1.3, it appears to be mute on the latter.


Robert Egan


-----Original Message-----
From: Chris Forbis [mailto:chris.forbis@veritas.com]
Sent: Friday, April 25, 2003 11:39 AM
To: 'Jakarta Commons Users List'
Subject: RE: DBCP: Closed connections


I would agree it should be a waste, but after much testing with at least the
Oracle 8i JDBC driver it does not.  The resultSet is left open causing a
cursor issue on the database.  So for safety I got in the habit of always
doing it.


-----Original Message-----
From: Hope, Matthew [mailto:Matthew.Hope@capitalone.com] 
Sent: Friday, April 25, 2003 3:43 AM
To: 'Jakarta Commons Users List'
Subject: RE: DBCP: Closed connections

Statement.close() javadoc contract guarantees that it will cascade close()
to the ResultSet...

<snipped>
 
*************************************************************************
PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary, confidential
and/or privileged information.  If you are not the intended recipient, any
use, copying, disclosure, dissemination or distribution is strictly
prohibited.  If you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all
copies.
************************************************************************* 

Mime
View raw message