Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix @Recover for Prototype Scoped Beans #96

Merged
merged 1 commit into from
Dec 5, 2017

Conversation

garyrussell
Copy link
Contributor

Previously, if a bean annotated with @Retryable and @Recover was
scoped "prototype", the @Recover method in the first instance was
called instead of the method in the same instance as the failed @Retryable
method.

This was because the delegate cache in AnnotationAwareRetryOperationsInterceptor
was keyed only on the Method object.

Change the cache to cache at the targetObject.method level.

Also fixes backoff javadocs.

Fixes #93

Previously, if a bean annotated with `@Retryable` and `@Recover` was
scoped "prototype", the `@Recover` method in the first instance was
called instead of the method in the same instance as the failed `@Retryable`
method.

This was because the delegate cache in `AnnotationAwareRetryOperationsInterceptor`
was keyed only on the `Method` object.

Change the cache to cache at the `targetObject.method` level.

Also fixes `backoff` javadocs.

Fixes spring-projects#93
@dsyer dsyer merged commit 48e9843 into spring-projects:master Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default @Retryable has 1s blocking back-off despite docs saying otherwise
2 participants