Code example for Connection

Methods: setTransactionIsolation

0
     * @return 
     * @throws SQLException 
     */ 
    protected Connection getDBConnection() throws SQLException {
        Connection c = dataSource.getConnection();
        c.setTransactionIsolation(2);
        return c;
    } 
 
    /** 
     * Closes the given connection 
     * @param con 
     */ 
    protected void close(Connection con) {
        if (con != null) {
            try { 
                con.close();
            } catch (Exception e) {
                log.warn("Exception while closing connection", e);
            } 
        }