return;
}
long startMillis = System.currentTimeMillis();
ConnectionProxy connection = statement.getConnectionProxy();
{
TraceEvent event = new TraceEvent("StatementAddBatchBefore", new Date(startMillis));
event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
event.putContext(TRACE_CONN_ID, connection.getId());
event.putContext(TRACE_STMT_ID, statement.getId());
event.putContext(TRACE_STMT_SQL, sql);
fireEvent(event);
}
try {
chain.statement_addBatch(statement, sql);
long timespan = System.currentTimeMillis() - startMillis;
{
TraceAfterEvent event = new TraceAfterEvent("StatementAddBatchAfter", new Date(startMillis), timespan);
event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
event.putContext(TRACE_CONN_ID, connection.getId());
event.putContext(TRACE_STMT_ID, statement.getId());
event.putContext(TRACE_STMT_SQL, sql);
fireEvent(event);
}
} catch (SQLException ex) {
{
TraceErrorEvent event = new TraceErrorEvent("StatementAddBatchError", new Date(startMillis), ex);
event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
event.putContext(TRACE_CONN_ID, connection.getId());
event.putContext(TRACE_STMT_ID, statement.getId());
event.putContext(TRACE_STMT_SQL, sql);
fireEvent(event);
}
throw ex;
} catch (RuntimeException ex) {
{
TraceErrorEvent event = new TraceErrorEvent("StatementAddBatchError", new Date(startMillis), ex);
event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
event.putContext(TRACE_CONN_ID, connection.getId());
event.putContext(TRACE_STMT_ID, statement.getId());
event.putContext(TRACE_STMT_SQL, sql);
fireEvent(event);
}
throw ex;
} catch (Error ex) {
{
TraceErrorEvent event = new TraceErrorEvent("StatementAddBatchError", new Date(startMillis), ex);
event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
event.putContext(TRACE_CONN_ID, connection.getId());
event.putContext(TRACE_STMT_ID, statement.getId());
event.putContext(TRACE_STMT_SQL, sql);
fireEvent(event);
}
throw ex;