I also found this tid bit lying around. It get's a connection, but doesn't
close the statement.
public static void closeResources(ResultSet rs) throws
AardvarkResourceException {
try {
Statement s = rs.getStatement();
if (s != null) { // ResultSets produced by metadata queries do
not have associated statements
Connection c = s.getConnection();
//s.close();
//c.close();
ConnectionPool.recycleConnection(c);
}
rs.close();
} catch (SQLException e) {
throw new AardvarkResourceException("Error closing resources
associated with ResultSet", e);
}
}
It still doesn't close the statement, but closes the connection leaving the
statement hanging.... I'll fix and make sure to use it.