Skip to content

Commit

Permalink
error is caught and logged by caller
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Apr 18, 2008
1 parent 4169cab commit 395752d
Showing 1 changed file with 11 additions and 16 deletions.
Expand Up @@ -109,22 +109,17 @@ public int updateIncomingBatch(IncomingBatch status) {
}

public void insertIncomingBatchHistory(IncomingBatchHistory history) {
try {
jdbcTemplate.update(insertIncomingBatchHistorySql, new Object[] {
Long.valueOf(history.getBatchId()), history.getNodeId(), history.getStatus().toString(),
history.getNetworkMillis(), history.getFilterMillis(), history.getDatabaseMillis(),
history.getHostName(), history.getByteCount(), history.getStatementCount(),
history.getFallbackInsertCount(), history.getFallbackUpdateCount(),
history.getMissingDeleteCount(), history.getFailedRowNumber(), history.getStartTime(),
history.getEndTime(), history.getSqlState(), history.getSqlCode(),
StringUtils.abbreviate(history.getSqlMessage(), 50) }, new int[] { Types.INTEGER, Types.VARCHAR, Types.CHAR,
Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.VARCHAR, Types.INTEGER, Types.INTEGER,
Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.TIMESTAMP,
Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.VARCHAR });
} catch (RuntimeException ex) {
logger.error(ex, ex);
throw ex;
}
jdbcTemplate.update(insertIncomingBatchHistorySql, new Object[] { Long.valueOf(history.getBatchId()),
history.getNodeId(), history.getStatus().toString(), history.getNetworkMillis(),
history.getFilterMillis(), history.getDatabaseMillis(), history.getHostName(),
history.getByteCount(), history.getStatementCount(), history.getFallbackInsertCount(),
history.getFallbackUpdateCount(), history.getMissingDeleteCount(),
history.getFailedRowNumber(), history.getStartTime(), history.getEndTime(),
history.getSqlState(), history.getSqlCode(),
StringUtils.abbreviate(history.getSqlMessage(), 50) }, new int[] { Types.INTEGER,
Types.VARCHAR, Types.CHAR, Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.VARCHAR,
Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.INTEGER,
Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.VARCHAR });
}

class IncomingBatchMapper implements RowMapper {
Expand Down

0 comments on commit 395752d

Please sign in to comment.