this is maybe more a question than a real issue but i would like to know what is the expected behavior.
the readme states that
Simple implementations will just throw RetryExhaustedException which will cause any enclosing transaction to be rolled back
but for a stateless retry, that is not the behavior i am seeing (always original exception thrown).
handleRetryExhausted is invoked correctly, with state being null (ok, i guess, because the retry is stateless). but then, it looks like always the original exception is thrown back to the user, never wrapped in an ExhaustedRetryException. that is because thrown() is not invoked but instead just throw wrapIfNecessary(context.getLastThrowable()); (https://github.com/spring-projects/spring-retry/blob/master/src/main/java/org/springframework/retry/support/RetryTemplate.java#L467)
thanks for clarification!
this is maybe more a question than a real issue but i would like to know what is the expected behavior.
the readme states that
but for a stateless retry, that is not the behavior i am seeing (always original exception thrown).
handleRetryExhaustedis invoked correctly, withstatebeingnull(ok, i guess, because the retry is stateless). but then, it looks like always the original exception is thrown back to the user, never wrapped in anExhaustedRetryException. that is becausethrown()is not invoked but instead justthrow wrapIfNecessary(context.getLastThrowable());(https://github.com/spring-projects/spring-retry/blob/master/src/main/java/org/springframework/retry/support/RetryTemplate.java#L467)thanks for clarification!