Subject | RE: [Firebird-Java] Re: Closing ResultSet |
---|---|
Author | Natal Vande Casteele |
Post date | 2003-07-22T08:35:15Z |
Hi,
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
>> Just a little additional comment. I have recently modified my codeI can confirm this. We use the latest release version of JayBird (1.0.0)
>> 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?
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