commandExecutor.execute(new Command<Void>() {
@Override
public Void execute(CommandContext commandContext) {
CommandConfig commandConfig = commandExecutor.getDefaultConfig().transactionRequiresNew();
FailedJobCommandFactory failedJobCommandFactory = commandContext.getFailedJobCommandFactory();
Command<Object> cmd = failedJobCommandFactory.getCommand(job.getId(), exception);
log.trace("Using FailedJobCommandFactory '" + failedJobCommandFactory.getClass() + "' and command of type '" + cmd.getClass() + "'");
commandExecutor.execute(commandConfig, cmd);
// Dispatch an event, indicating job execution failed in a try-catch block, to prevent the original
// exception to be swallowed
if (commandContext.getEventDispatcher().isEnabled()) {