/** * Close utility method. * * @param ps * statement to close. */ public void closeQuietly(Statement ps) { DbHelper.closeQuietly(ps); }
/** * Close utility method. * * @param ps * statement to close through a result set. */ public void closeQuietly(ResultSet ps) { DbHelper.closeQuietly(ps); }
/** * Close utility method. * * @param ps * statement to close. */ public void closeQuietly(Closeable ps) { DbHelper.closeQuietly(ps); }
/** * Close utility method. * * @param ps * statement to close. */ public void closeQuietly(Closeable ps) { DbHelper.closeQuietly(ps); }
/** * Close utility method. * * @param ps * statement to close. */ public void closeQuietly(Connection ps) { DbHelper.closeQuietly(ps); }
/** * Close utility method. * * @param ps * statement to close. */ public void closeQuietly(Connection ps) { DbHelper.closeQuietly(ps); }
/** * Close utility method. * * @param ps * statement to close through a result set. */ public void closeQuietly(ResultSet ps) { DbHelper.closeQuietly(ps); }
/** * Close utility method. * * @param ps * statement to close. */ public void closeQuietly(Statement ps) { DbHelper.closeQuietly(ps); }
/** * A connection to the database. Should be short-lived. No transaction active by default. * * @return a new open connection. */ public DbConn getConn() { Connection cnx = null; try { Thread.interrupted(); // this is VERY sad. Needed for Oracle driver which otherwise fails spectacularly. cnx = _ds.getConnection(); if (cnx.getAutoCommit()) { cnx.setAutoCommit(false); cnx.rollback(); // To ensure no open transaction created by the pool before changing TX mode } if (cnx.getTransactionIsolation() != Connection.TRANSACTION_READ_COMMITTED) { cnx.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); } return new DbConn(this, cnx); } catch (SQLException e) { DbHelper.closeQuietly(cnx); // May have been left open when the pool has given us a failed connection. throw new DatabaseException(e); } }
/** * A connection to the database. Should be short-lived. No transaction active by default. * * @return a new open connection. */ public DbConn getConn() { Connection cnx = null; try { Thread.interrupted(); // this is VERY sad. Needed for Oracle driver which otherwise fails spectacularly. cnx = _ds.getConnection(); if (cnx.getAutoCommit()) { cnx.setAutoCommit(false); cnx.rollback(); // To ensure no open transaction created by the pool before changing TX mode } if (cnx.getTransactionIsolation() != Connection.TRANSACTION_READ_COMMITTED) { cnx.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); } return new DbConn(this, cnx); } catch (SQLException e) { DbHelper.closeQuietly(cnx); // May have been left open when the pool has given us a failed connection. throw new DatabaseException(e); } }
DbHelper.closeQuietly(isr); DbHelper.closeQuietly(is);
DbHelper.closeQuietly(isr); DbHelper.closeQuietly(is);
DbHelper.closeQuietly(s);
DbHelper.closeQuietly(s);