Code example for Connection

Methods: closesetTransactionIsolation

0
            getLog().warn("Failed restore connection's original auto commit setting.", t);
        } 
         
        try {     
            if (overwroteOriginalTxIsolationValue) {
                conn.setTransactionIsolation(originalTxIsolationValue);
            } 
        } catch (Throwable t) {
            getLog().warn("Failed restore connection's original transaction isolation setting.", t);
        } 
    } 
     
    /** 
     * Attempts to restore the auto commit and transaction isolation connection 
     * attributes of the wrapped connection to their original values (if they 
     * were overwritten), before finally actually closing the wrapped connection. 
     */ 
    public void close() throws SQLException { 
        restoreOriginalAtributes(); 
         
        conn.close();
    } 
} 
Experience pair programming with AI  Get Codota for Java