Transactions, Spring.
DriverManager.getConnection(CONNECTION_URL, USER, PASSWORD); try { connection.setAutoCommit(false); PreparedStatement firstStatement = connection .prepareStatement("firstQuery"); firstStatement.executeUpdate(); PreparedStatement secondStatement = connection .prepareStatement("secondQuery");