Leif Mortenson wrote:
>
> In the AbstractJdbcConnection a single statement is being opened and
> kept around for the Keep Alive feature. Each time the database is
> pinged, the same statement is reused to execute query. According to
> the Javadocs, this should be closing any previous ResultSets. So
> this shouldn't have been a problem. Is this a known place where
> Oracle does not conform to the JDBC standard? We only use MySQL,
> PostgreSQL and HSQL and they all seem fine.
According to this page:
http://www.cs.umbc.edu/help/oracle8/java.815/a64685/tips3.htm
---
Memory Leaks and Running Out of Cursors
If you receive messages that you are running out of cursors or that you
are running out of memory, make sure that all of your Statement and
ResultSet objects are explicitly closed. The Oracle JDBC drivers do not
have finalizer methods; they perform cleanup routines by using the
close() method of the ResultSet and Statement classes. If you do not
explicitly close your result set and statement objects, serious memory
leaks could occur. You could also run out of cursors in the database.
Closing a result set or statement releases the corresponding cursor in
the database.
Similarly, you must explicitly close Connection objects to avoid leaks
and running out of cursors on the server side. When you close the
connection, the JDBC driver closes any open statement objects associated
with it, thus releasing the cursor objects on the servers side.
---
Oracle JDBC drivers do NOT seem to be following the JDBC spec. So It
looks like all Statements and ResultSets do need to be closed?
:-/
Leif
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>