On Tue, 26 Apr 2005, Antony Paul wrote:
> What will happen if I leave ResultSet and PreparedStatement not
> closed and I use a connection pool which is not closing the ResultSet
> and PreparedStatement. Will it cause resource leak in the server ?.
It depends there are two types of PreparedStatements and two types of
ResultSets each one has a version that takes no permanent server resources
and a version that does. A PreparedStatement may keep a permanent
prepared plan on the server and a ResultSet may be backed by a cursor
which also has server state. Its possible you can get away with it, but
it's best to close everything.
Kris Jurka