PreparedStatement insertStatement = null; try { connection = connectionSource.getConnection(); connection.setAutoCommit(false);
@Override public void append(E eventObject) { Connection connection = null; try { connection = connectionSource.getConnection(); connection.setAutoCommit(false); PreparedStatement insertStatement; if (cnxSupportsGetGeneratedKeys) { insertStatement = connection.prepareStatement(getInsertSQL(), new String[] {"EVENT_ID"}); } else { insertStatement = connection.prepareStatement(getInsertSQL()); } subAppend(eventObject, connection, insertStatement); // we no longer need the insertStatement if (insertStatement != null) { insertStatement.close(); insertStatement = null; } connection.commit(); } catch (Throwable sqle) { addError("problem appending event", sqle); } finally { DBHelper.closeConnection(connection); } }
PreparedStatement insertStatement = null; try { connection = connectionSource.getConnection(); connection.setAutoCommit(false);
PreparedStatement insertStatement = null; try { connection = connectionSource.getConnection(); connection.setAutoCommit(false);
Connection connection = null; try { connection = connectionSource.getConnection(); connection.setAutoCommit(false); PreparedStatement insertStatement;
PreparedStatement insertStatement = null; try { connection = connectionSource.getConnection(); connection.setAutoCommit(false);
Connection connection = null; try { connection = connectionSource.getConnection(); connection.setAutoCommit(false); PreparedStatement insertStatement;
PreparedStatement insertStatement = null; try { connection = connectionSource.getConnection(); connection.setAutoCommit(false);