public int executeUpdate ( String query ) throws Exception { int returnVal = 0 ; Statement queryStatement = null ; try ( Connection sqlConnection = getConnection ( ) ) { queryStatement = sqlConnection . createStatement ( ) ; returnVal = queryStatement . executeUpdate ( query ) ; } catch ( Exception e ) { } finally { try { if ( queryStatement != null ) { queryStatement . close ( ) ; } } catch ( Exception e ) { } } return returnVal ; }
Wrapped version of standard jdbc executeUpdate Pays attention to DB locked exception and waits up to 1s