Transactions, Spring.
secondStatement.executeUpdate(); connection.commit(); } catch (Exception e) { connection.rollback(); } Here, we have disabled the auto-commit mode of Connection. Hence, we can manually define the transaction boundary and perform a commit or rollback. JDBC also allows us to set a SavePoint that