db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sin(EaTing)," <uss...@gmail.com>
Subject Re: How to return an array of String in a Java routine?
Date Sun, 01 Jun 2008 13:38:55 GMT
That's really, really great.

On Sun, Jun 1, 2008 at 4:24 PM, Knut Anders Hatlen <Knut.Hatlen@sun.com>
wrote:

> sin(EaTing), wrote:
>
>> Hi,
>>
>> And one of the tricky point I found in the example is if a ResultSet is
>> returned by a stored procedure, the Statement which generates the ResultSet
>> cannot be closed in the procedure, or the ResultSet won't be returned
>> correctly.
>> So in the example ps1 and ps2 is not closed. Quite interesting, should
>> they be garbage collected properly or whether they will cause some
>> transaction problem if they are not closed?
>>
>
> Hi,
>
> The result sets that are created inside a stored procedure are marked with
> a flag internally, and when such a result set is closed it will also close
> the statement that created it. So there shouldn't be any resource leak by
> using this approach.
>
> --
> Knut Anders
>

Mime
View raw message