JpaEventStore and resource local transactions

I have a persistence unit with resource local transactions.
It seems Axonframework doesn’t handle the transaction explicitly in this context and this exception is thrown:

[2013-07-31 17:43:05,896 - DEBUG] ( -> [An error occurred while committing this UnitOfWork. Performing rollback…]

[2013-07-31 17:43:05,899 - DEBUG] ( -> [javax.persistence.TransactionRequiredException: no transaction is in progress

How can I solve?
Of course change to jta transactions is not an option for me.

Hi Andrea,

do you use a container, like Spring?
To attach transactions to a UnitOfWork, Axon needs a Transaction Manager. Currently, a SpringTransactionManager is the only implementation.
If you use an application managed EntityManager, you may need to create a transaction manager that retrieves the active EntityManager and starts a session on it (and later either commits or rolls back).



I don’t have a container like Spring.
I tried to implement a Transaction Manager and all seems to work in memory but nothing is wrote do DB.
I’m investigating…