I have a transaction issue on COR pattern:
AbstractChainHandler
| |
| |
FirstChainHandler SecondChainHandler
-create A -create B
-delete A -delete B
FirstChainHandler and SecondChainHandler both extend AbstractChainHandler and they do some persistence tasks. Is it possible to handle transaction so if SecondChainHandler fails to save B on db also FirstChainHandler does the rollback of A persistence?
I am trying with spring @Transactional but it is not working and I am not sure if COR pattern matches my goal. I tryied to change propagation and isolation configurations but it didn't work.