But the class which you are using to implement one of these interfaces (Connection or Statement) comes, if I am not mistaken, in the specific JDBC driver which you have gotten for your database. It probably does not come from Sun. You may not have a reliable guarantee that the "shoulds" have been done. I have seen stories of memory leaks, of cases where "should" close has not happened, and something broke.
Rich Hammer
Tony Spencer wrote:
Is it necessary to close a ResultSet and PreparedStatement at the end of
some JDBC code before closing the Connection or are they closed
automatically by closing the database connection?
For example is this ok?
Connection conn = DbPool.getConnection(); ResultSet rs = null; PreparedStatement = null; . . . conn.close();
Or should I do this?
Connection conn = DbPool.getConnection(); ResultSet rs = null; PreparedStatement = null; . . . rs.close(); stmnt.close(); conn.close();
_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org
