You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Description:
In my main function, I have added the annotation @transactional (org.springframework.transaction.annotation.Transactional).
Inside this main function, I call another service method that is also annotated with @transactional.
When an exception of type org.springframework.dao.DuplicateKeyException is thrown, even though I already have a try-catch block to catch this exception in the main function, the function still keeps retrying automatically.
Question:
Why does the function retry even after the exception has been caught in the main function?