[Axon 3-Spring Boot] Transaction Management

Hi,

Is there any other configuration required to achieve a rollback of the eventstore in case of a query model failure ? I have put together a very basic application with this configuration, but the eventstore commits instead of rolling back when an @EventHandler throws an exception.

`

@Bean
AggregateConfigurer configureProcessAR() {
return AggregateConfigurer.defaultConfiguration(TheAR.class);
}

@Bean
EventStorageEngine eventStorageEngine(DataSource dataSource,
TransactionManager transactionManager) {
JdbcEventStorageEngine jdbcEventStorageEngine = new JdbcEventStorageEngine(
new SpringDataSourceConnectionProvider(dataSource), transactionManager);
// because the jdbc event storage engine does not create the tables automatically
jdbcEventStorageEngine.createSchema(HsqlEventTableFactory.INSTANCE);
return jdbcEventStorageEngine;
}

@Bean
PropagatingErrorHandler propagatingErrorHandler() {
return PropagatingErrorHandler.instance();
}

@Bean
SimpleCommandBus commandBus(TransactionManager transactionManager) {
// instantiate the commandbus to add a message monitor
SimpleCommandBus simpleCommandBus = new SimpleCommandBus(transactionManager, messageMonitor());
simpleCommandBus
.registerHandlerInterceptor(new TransactionManagingInterceptor<>(transactionManager));
simpleCommandBus.setRollbackConfiguration(RollbackConfigurationType.ANY_THROWABLE);
return simpleCommandBus;
}

`

The command is sent transactionally, so i expected all axon components (given above config) to participate in the same transaction and have a global commit or rollback.

`

new TransactionTemplate(platformTransactionManager)
.execute(new TransactionCallbackWithoutResult() {
@Override
protected void doInTransactionWithoutResult(TransactionStatus status) {
commandGateway.send(command);
}
});

`

Thanks,
Jorg