// invoke sendBatch();
rows = ((Integer) METHOD_SEND_BATCH.invoke(pstmtDelegate.unwrap(pstmt))).intValue();
} catch (IllegalAccessException e) {
String msg = "Error invoking Oracle sendBatch method via reflection";
throw new PersistenceException(msg,e);
} catch (InvocationTargetException e) {
String msg = "Error invoking Oracle sendBatch method via reflection";
throw new PersistenceException(msg, e);
}
if (occCheck && rows != expectedRows) {
String msg = "Batch execution expected "+expectedRows+" but got "+rows+" sql:"+sql;
throw new OptimisticLockException(msg);
}