if (exception == null || shouldDecrementRetriesFor(exception)) {
job.setRetries(job.getRetries() - 1);
}
JobExecutor jobExecutor = Context.getProcessEngineConfiguration().getJobExecutor();
MessageAddedNotification messageAddedNotification = new MessageAddedNotification(jobExecutor);
TransactionContext transactionContext = commandContext.getTransactionContext();
transactionContext.addTransactionListener(TransactionState.COMMITTED, messageAddedNotification);
}
}