After running into issues where I ran out of cursors,
I noticed that the potential seems to exist for
statements to be created that are never closed in the
JDBCHelper code. In executeQuery, line 362, if
i_reuseStatement is false, a statement is created. If
after the query the connection is closed (via
JDBCHelper.close()), the statement (and the resultset,
for that matter) appears to remain open.
While this may not be a problem for users of
JDBCHelperPool, it can present a problem for clients
who use JDBCHelper independently because the potential
exists for the statements to remain open indefinitely
(or at least until the JDBCHelper is garbage
collected). Even in the event the statement is garbage
collected, the failure to close the statement
represents a leak of sorts. Thus, in the case where
JDBCHelpers are created repeatedly, the client can
quickly run out of cursors.
This problem appears if i_shouldClose is set to 'true'.
Modified source for JDBCHelper with close calls