public void commit ( ) throws SQLException { lock . lock ( ) ; try { if ( protocol . inTransaction ( ) ) { try ( Statement st = createStatement ( ) ) { st . execute ( "COMMIT" ) ; } } } finally { lock . unlock ( ) ; } }
Sends commit to the server .