[Axon 3-Spring Boot] Transaction Management

It seems sendAndWait on the command gateway produces the ‘desired’ behaviour, which makes sense now that i think about it.

The following would also work, i guess semantically it’s the same as doing sendAndWait

`

new TransactionTemplate(platformTransactionManager)
.execute(new TransactionCallbackWithoutResult() {
@Override
protected void doInTransactionWithoutResult(TransactionStatus status) {
FutureCallback<TheCommand, Object> callback = new FutureCallback<>();
commandGateway.send(command, callback);
callback.getResult();
}
});

`

Jorg