Asynchronous command bus error with saga

hi,

First of all this framework is really great, appreciate all you efforts.
Currently I am using commandgateway to send command but its taking time and I want to decouple this and send some response without waiting for commandgateway to return.
I found AsynchronousCommandBus can be used.

After trying to use Asynchronous command bus along with saga to send command, getting below error:

org.axonframework.modelling.saga.repository.SagaCreationException: An error occurred while attempting to create a new managed instance

I tried to find examples on how to use it with Axon 4 but all was only for axon 2/3 and looks like axon 4 has changes and protected methods for AsynchronousCommandBus.
Any sample code would help.

Thank you.

Hi,

without the full stacktrace, I am not entirely sure what’s happening. My guess is that Hibernate complains about a Transaction not being present. If that’s the case, you will need to configure a TransactionManager on your AsynchronousCommandBus. That ensures that command handling is executed using a transaction.

Cheers,