private void close ( State state ) { // ensure close happens once only to avoid race conditions if ( state . closed . compareAndSet ( false , true ) ) { Util . closeQuietly ( state . ps ) ; if ( isCommit ( ) || isRollback ( ) ) Util . closeQuietly ( state . con ) ; else Util . closeQuietlyIfAutoCommit ( state . con ) ; } }
Cancels a running PreparedStatement closing it and the current Connection but only if auto commit mode .