Subject | Re: Closing ResultSet |
---|---|
Author | Roman Rokytskyy |
Post date | 2003-07-21T16:31:37Z |
Hi,
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.
Best regards,
Roman Rokytskyy
> I know this is JDBC conformant, so my question is: is there anyI use ValueObject pattern (part of DataAccessObject pattern). You
> convenient and maybe standard way to achieve my goals?
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 codeMaybe bug in JayBird. Which version do you use?
> 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?
Best regards,
Roman Rokytskyy