.append(" prior sub executor(s) completed successfully, but will be rolled back."); throw new BatchExecutorException(message.toString(), e, results, batchResult);
/** * An OptimisticLockingException check for batch processing * * @param operationsToFlush The list of DB operations in which the Exception occurred * @param cause the Exception object * @return The DbOperation where the OptimisticLockingException has occurred * or null if no OptimisticLockingException occurred */ private DbOperation hasOptimisticLockingException(List<DbOperation> operationsToFlush, Throwable cause) { BatchExecutorException batchExecutorException = ExceptionUtil.findBatchExecutorException(cause); if (batchExecutorException != null) { int failedOperationIndex = batchExecutorException.getSuccessfulBatchResults().size(); if (failedOperationIndex < operationsToFlush.size()) { DbOperation failedOperation = operationsToFlush.get(failedOperationIndex); if (isOptimisticLockingException(failedOperation, cause)) { return failedOperation; } } } return null; }
.append(" prior sub executor(s) completed successfully, but will be rolled back."); throw new BatchExecutorException(message.toString(), e, results, batchResult);
/** * An OptimisticLockingException check for batch processing * * @param operationsToFlush The list of DB operations in which the Exception occurred * @param cause the Exception object * @return The DbOperation where the OptimisticLockingException has occurred * or null if no OptimisticLockingException occurred */ private DbOperation hasOptimisticLockingException(List<DbOperation> operationsToFlush, Throwable cause) { BatchExecutorException batchExecutorException = ExceptionUtil.findBatchExecutorException(cause); if (batchExecutorException != null) { int failedOperationIndex = batchExecutorException.getSuccessfulBatchResults().size(); if (failedOperationIndex < operationsToFlush.size()) { DbOperation failedOperation = operationsToFlush.get(failedOperationIndex); if (isOptimisticLockingException(failedOperation, cause)) { return failedOperation; } } } return null; }
.append(" prior sub executor(s) completed successfully, but will be rolled back."); throw new BatchExecutorException(message.toString(), e, results, batchResult);
/** * An OptimisticLockingException check for batch processing * * @param operationsToFlush The list of DB operations in which the Exception occurred * @param cause the Exception object * @return The DbOperation where the OptimisticLockingException has occurred * or null if no OptimisticLockingException occurred */ private DbOperation hasOptimisticLockingException(List<DbOperation> operationsToFlush, Throwable cause) { BatchExecutorException batchExecutorException = ExceptionUtil.findBatchExecutorException(cause); if (batchExecutorException != null) { int failedOperationIndex = batchExecutorException.getSuccessfulBatchResults().size(); if (failedOperationIndex < operationsToFlush.size()) { DbOperation failedOperation = operationsToFlush.get(failedOperationIndex); if (isOptimisticLockingException(failedOperation, cause)) { return failedOperation; } } } return null; }