protected static void invokeJobListener(CommandExecutor commandExecutor, JobFailureCollector jobFailureCollector) { if(jobFailureCollector.getJobId() != null) { if (jobFailureCollector.getFailure() != null) { // the failed job listener is responsible for decrementing the retries and logging the exception to the DB. FailedJobListener failedJobListener = createFailedJobListener(commandExecutor, jobFailureCollector.getFailure(), jobFailureCollector.getJobId()); OptimisticLockingException exception = callFailedJobListenerWithRetries(commandExecutor, failedJobListener); if (exception != null) { throw exception; } } else { SuccessfulJobListener successListener = createSuccessfulJobListener(commandExecutor); commandExecutor.execute(successListener); } } }
protected static void invokeJobListener(CommandExecutor commandExecutor, JobFailureCollector jobFailureCollector) { if(jobFailureCollector.getJobId() != null) { if (jobFailureCollector.getFailure() != null) { // the failed job listener is responsible for decrementing the retries and logging the exception to the DB. FailedJobListener failedJobListener = createFailedJobListener(commandExecutor, jobFailureCollector.getFailure(), jobFailureCollector.getJobId()); OptimisticLockingException exception = callFailedJobListenerWithRetries(commandExecutor, failedJobListener); if (exception != null) { throw exception; } } else { SuccessfulJobListener successListener = createSuccessfulJobListener(commandExecutor); commandExecutor.execute(successListener); } } }
protected static void invokeJobListener(CommandExecutor commandExecutor, JobFailureCollector jobFailureCollector) { if(jobFailureCollector.getJobId() != null) { if (jobFailureCollector.getFailure() != null) { // the failed job listener is responsible for decrementing the retries and logging the exception to the DB. FailedJobListener failedJobListener = createFailedJobListener(commandExecutor, jobFailureCollector.getFailure(), jobFailureCollector.getJobId()); OptimisticLockingException exception = callFailedJobListenerWithRetries(commandExecutor, failedJobListener); if (exception != null) { throw exception; } } else { SuccessfulJobListener successListener = createSuccessfulJobListener(commandExecutor); commandExecutor.execute(successListener); } } }