Am trying to use spring-retry and i want to update my DB every time the spring-retry works for 5 retries.
In database a column need to be updated in order to track if the retry was made 5 times or not.
Am trying to use spring-retry and i want to update my DB every time the spring-retry works for 5 retries.
In database a column need to be updated in order to track if the retry was made 5 times or not.
You can add a RetryListener
to the RetryTemplate
; the count is in the RetryContext
argument passed in.
You can add more information to the context if needed, by getting a reference to it using the RetrySynchronizationManager
.