Subject Re: Closing ResultSet
Author Roman Rokytskyy

> I know this is JDBC conformant, so my question is: is there any
> convenient and maybe standard way to achieve my goals?

I use ValueObject pattern (part of DataAccessObject pattern). You
convert your result set into set of objects, one per record, and
forget about JDBC interfaces at once. You have to keep them in memory,
because cursor will be released by driver as soon as corresponding
statement and/or connection are closed.

Another idea would be to create InMemoryResultSet that will implement
ResultSet interface and keep all records in memory. Probably easier to
implement, but I personally do not like it.

> Just a little additional comment. I have recently modified my code
> to use connection pooling with DBCP in Tomcat. Before the code
> modification, I could close the PreparedStement and keep using the
> ResultSet, as I want to do now. Does Anybody know why?

Maybe bug in JayBird. Which version do you use?

Best regards,
Roman Rokytskyy