Subject Re: Resource cleanup and pools
Author Roman Rokytskyy
> When a statement is closed (returned to the pool) does it close its
> result sets?

When you use statement pooling (available only when connection pooling
is used), and prepared statement is returned to the pool, result set
is not closed automatically. I will fix this soon. When no pooling is
used, result set is closed when statement is closed. Also result set
is automatically closed when statement is re-executed.

> When a connection is closed (returned to the pool) does it close its
> statements?

Yes, however this results in PreparedStatement.close() call of the
proxy object. This does not close result set automatically when
statement pooling is used.

> The reason I ask is some drivers don't close these resources, and I
> was going to write a connection decorator/wrapper to track and close
> these resources and log a debug message. If Jaybird takes care of
> this, I'll be able to spend my coding time elsewhere.

JDBC specs tell us when to close result set automatically. If JayBird
does not do this somewhere, then this is a bug and should be fixed.
Personally I see no reason to implement such wrapper for JayBird.

Roman