@Override protected void setRollbackCause(Throwable cause) { setExecutionResult(new ExecutionResult(asResultMessage(cause))); }
@Override protected void setRollbackCause(Throwable cause) { processingContexts.forEach(context -> context .setExecutionResult(new ExecutionResult(new GenericResultMessage<>(cause)))); }
@Override protected void setRollbackCause(Throwable cause) { setExecutionResult(new ExecutionResult(new GenericResultMessage<>(cause))); }
return asResultMessage(e); setExecutionResult(new ExecutionResult(asResultMessage(e))); if (cause != null) { cause.addSuppressed(e); continue; setExecutionResult(new ExecutionResult(resultMessage));
setExecutionResult(new ExecutionResult(resultMessage)); try { commit();
@Override protected void setRollbackCause(Throwable cause) { setExecutionResult(new ExecutionResult(cause)); }
@Override protected void setRollbackCause(Throwable cause) { processingContexts.forEach(context -> context.setExecutionResult(new ExecutionResult(cause))); }
@Override protected void setRollbackCause(Throwable cause) { setExecutionResult(new ExecutionResult(cause)); }
@Override protected void setRollbackCause(Throwable cause) { setExecutionResult(new ExecutionResult(asResultMessage(cause))); }
@Override protected void setRollbackCause(Throwable cause) { processingContexts.forEach(context -> context .setExecutionResult(new ExecutionResult(new GenericResultMessage<>(cause)))); }
@Override protected void setRollbackCause(Throwable cause) { setExecutionResult(new ExecutionResult(new GenericResultMessage<>(cause))); }
@Override public <R> R executeWithResult(Callable<R> task, RollbackConfiguration rollbackConfiguration) throws Exception { if (phase() == Phase.NOT_STARTED) { start(); } Assert.state(phase() == Phase.STARTED, () -> String.format("The UnitOfWork has an incompatible phase: %s", phase())); R result; try { result = task.call(); } catch (Error | Exception e) { if (rollbackConfiguration.rollBackOn(e)) { rollback(e); } else { setExecutionResult(new ExecutionResult(e)); commit(); } throw e; } setExecutionResult(new ExecutionResult(result)); commit(); return result; }
throw e; setExecutionResult(new ExecutionResult(e)); if (exception != null) { exception.addSuppressed(e); setExecutionResult(new ExecutionResult(result));
return asResultMessage(e); setExecutionResult(new ExecutionResult(asResultMessage(e))); if (cause != null) { cause.addSuppressed(e); continue; setExecutionResult(new ExecutionResult(resultMessage));
setExecutionResult(new ExecutionResult(resultMessage)); try { commit();