From the docs
(https://cayenne.apache.org/docs/4.2/cayenne-guide/#transactions):
If you are using Spring, EJB or another environment that manages transactions,
you’ll likely need to switch the Cayenne runtime into "external transactions
mode". This is done by setting the DI configuration prope
-the-container/
I used it quite successfully some time ago when I was doing this kind
of work, along with
org.springframework.test.AbstractTransactionalSpringContextTests
or its subclass
org
.springframework.test.AbstractTransactionalDataSourceSpringContextTests
Good stuff.
Paul