Currently I have a controller which calls @Transactional
annotated method in a service A which inserts the entity to a database, and then calls another method in a service B which updates the entity.
I would like to call only the method in a service A, which will then in turn call a method in a service B. First transaction should happen in a method of a service A, and another transaction should happen in a method of a service B.
I have tried to understand @Transactional
annotation, its isolation
and propagation
in order to achieve this, but I couldn't make it work.