}
} catch (SQLException sqle) {
if (logger.isDebugEnabled()) {
logger.log(Level.DEBUG, "DbHandler:close", sqle);
}
throw new DbHandlerException("Can't close the resultset\n"
+ sqle.getMessage(), sqle.getSQLState(), sqle.getErrorCode());
}
try {
// Close the statement
if (stmt != null) {
stmt.close();
stmt = null;
}
} catch (SQLException sqle) {
throw new DbHandlerException("Can't close the statement\n"
+ sqle.getMessage(), sqle.getSQLState(), sqle.getErrorCode());
}
try {
// Close the statement
if (pstmt != null) {
pstmt.close();
pstmt = null;
}
} catch (SQLException sqle) {
throw new DbHandlerException("Can't close the prepared statement\n"
+ sqle.getMessage(), sqle.getSQLState(), sqle.getErrorCode());
}
try {
// Close the conection. The connection isn't really closed, it's
// only
// given back to the connection pool and marked as available.
if (con != null) {
con.close();
con = null;
}
initiated = false;
} catch (SQLException sqle) {
throw new DbHandlerException("Can't close the connection\n"
+ sqle.getMessage(), sqle.getSQLState(), sqle.getErrorCode());
}
}