Wei Jiang <[EMAIL PROTECTED]> writes:

> java.sql javadoc says:
>
> Note: A Statement object is automatically closed when it is garbage collected.
> When a Statement object is closed, its current ResultSet object, if one 
> exists,
> is also closed.

>
> I do not close ResultSet. But I do close Statement. Is it possible that
> when derby's Statement closed, the ResultSet is not?

Can't say, but what I do know is that when you RE-EXECUTE a statement
you get a new ResultSet, but you don't automatically close the previous
ResultSet. So if you create multiple ResultSets from the same
statement before you close it, ResultSets will be leaked, at least
temporarily.

I have been told that this is incorrect according to the JDBC
specification...

>
> I did forget to close one statement.

Does it help to close that statement? If not; I would try to close the
ResultSets to see if that helps...

-- 
dt

Reply via email to