Subject RE: [Firebird-Java] Re: Closing ResultSet
Author Natal Vande Casteele
Hi,

>> 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?

I can confirm this. We use the latest release version of JayBird (1.0.0)
and with the built-in connection pooling, we can release the statement
and connection, yet still keep using the ResultSet (which is a handy
'feature', even though it seems non-compliant). A switch to DBCP
connection pooling releases the ResultSet at the moment the statement or
connection is released.

Unfortunately, our code is written the same way as Lopez's code -- i.e.
all statements are closed in a finally block and the resultset is
returned from the procedure to be used afterwards, so a switch to DBCP
would require a rather major rewrite. :-/ Maybe ValueObject might
provide an easier solution in our case.

Regards,
Natal Vande Casteele
Software Engineer
Pocket and Soul