private void cleanConnectionClose ( Connection connection , Statement stmt ) { try { // clean close if ( connection != null ) { connection . rollback ( ) ; } if ( stmt != null ) { stmt . close ( ) ; } if ( connection != null ) { connection . close ( ) ; } } catch ( SQLException e1 ) { e1 . printStackTrace ( ) ; } }
Close connection and sql statement in a clean way .