Hi,
I am using Axxon 2.4.2 with JPA/Spring.
I have a working configuration of the EventSourcingRepository:
<axon:event-sourcing-repository
id=“myEntityRepository”
aggregate-type=“nl.dsen.MyEntity”
event-bus=“eventBus”
event-store=“eventStore”/>
I want to change this to use the HybridJpaRepository, but I am running into some issues.
I changed the configuration to:
Now, how should I configure first constructor argument to the HybridJpaRepository bean? Should I create custom EntityManagerProvider? I tried that route but ran into an Exception:
WARN [2015-09-11 15:52:16,675] org.axonframework.commandhandling.callbacks.LoggingCallback: Command resulted in exception: nl.dsen.zmag.domain.zaak.CreateZaakCommand
! javax.persistence.TransactionRequiredException: no transaction is in progress
! at org.hibernate.jpa.spi.AbstractEntityManagerImpl.checkTransactionNeeded(AbstractEntityManagerImpl.java:1136)
! at org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1297)
A pointer to some examples would be helpfull.
Thanks for a great framework so far.
Best, Thomas