Hi,
In my jmix project I have two datastores, and I’m trying to implement the following idea:
I woul like to react to a change in an entity X in the main datastore, performing several operation on entities of the additional datastore (insert, delete and update of different entities A B).
Those operations must be performed transactionally (I mean: if something fails, I would like to rollback all changes in A B)
I’ve ended up creating a listener on X, which call a service (annotated with @Transactional(“AdditionalDatastore”)) that perform the CRUDs on A and B.
I’ve also tried using programmatic transactions as shown in the documentation…
but either ways it always complains that the active transaction is from the main datastore
Am I doing it wrong, or there is no simple way to do it?
thank you