Commit Graph

78 Commits

Author SHA1 Message Date
Josh Long
004d277c81 javadoc 2016-02-12 17:12:40 +01:00
Dave Syer
cacf5d25db Fix another typo 2016-02-10 09:38:23 +00:00
Dave Syer
c1ad693825 Tidy up some javadocs 2016-02-10 09:34:21 +00:00
Gary Russell
d0ac53c76e Add Code of Conduct 2016-02-03 09:58:36 -05:00
Dave Syer
c2c3acbf6b Add javadocs report 2014-11-11 22:09:18 +00:00
Dave Syer
162c4167ce Add wagon provider for ssh 2014-11-11 22:09:13 +00:00
Dave Syer
ea9011643c [maven-release-plugin] prepare for next development iteration 2014-09-30 13:17:32 +01:00
Dave Syer
80871bce11 [maven-release-plugin] prepare release 1.1.2 2014-09-30 13:17:25 +01:00
Dave Syer
55839cefbb Widen Pointcut for @Retryable to cover multiple methods on same class
Fixes gh-15
2014-09-19 10:24:54 +01:00
Dave Syer
ff27754e74 Remove unused local variable 2014-09-19 09:33:52 +01:00
Dave Syer
b866155ffb Tidy up dependencies (spring-context is now optional) 2014-09-19 09:33:40 +01:00
Dave Syer
e2bee41f02 Spelling mistake 2014-09-19 09:22:35 +01:00
Dave Syer
155ea0c2df [maven-release-plugin] prepare for next development iteration 2014-08-28 13:51:11 +01:00
Dave Syer
d85cb5dac7 [maven-release-plugin] prepare release 1.1.1.RELEASE 2014-08-28 13:51:06 +01:00
Dave Syer
bc52a70dbc Bump release plugin 2014-08-28 13:50:50 +01:00
Dave Syer
bdc4025250 Fixes gh-12: correct Javadocs
The method signature for RetryCallback was changed in 1.1 but the
Javadocs in RetryTemplate still reflected the old behaviour.
2014-08-22 16:16:18 +01:00
Artem Bilan
20d703410a Fix @EnableRetry do not proxy all beans
Fixes https://github.com/spring-projects/spring-retry/issues/13

Previously the `@EnableRetry` caused to proxy **all** beans in the context, because
of `IntroductionAdvisor` nature in the `AopUtils` logic and simple `ClassFilter.TRUE`
in that case. In the end it just skipped `MethodMatcher` and applied `ProxyFactory` for any bean.

Since we can't avoid `IntroductionAdvisor` because of `getInterfaces()` introduction,
provide a new internal `AnnotationClassOrMethodFilter` to apply both class and method level annotation filter at once.

Polishing for the `AnnotationAwareRetryOperationsInterceptor` to skip non-`@Retryable` methods and just call `invocation.proceed()`

Fixes gh-13, fixes gh-14
2014-08-22 16:02:44 +01:00
Dave Syer
3e638ef52f Use Spring BOM for dependencies 2014-05-15 08:21:36 +01:00
Dave Syer
2a16bf9e9b Move to next SNAPSHOT 2014-05-13 11:13:05 +01:00
Dave Syer
715341e787 Update to 1.1.0.RELEASE 2014-05-13 09:42:51 +01:00
Dave Syer
209af18329 Update to 1.1.0.RC3 2014-05-12 17:14:18 +01:00
Artem Bilan
f9e53099bd Add RetryInterceptorBuilder support
* Add `RetryInterceptorBuilder` and its tests
* Add usage from `AnnotationAwareRetryOperationsInterceptor`
* Add `Retryable#interceptor()` option to use full Retry Interceptor from `BeanFactory`
* Fix `RetryConfiguration` `beanFactory` propagation

Fixes gh-11
2014-05-12 17:08:11 +01:00
Artem Bilan
1a54a3e1c2 Code Cleanup
* Deprecate `ObjectWaitSleeper` and replace it with `ThreadWaitSleeper`
* Improve `SimpleMethodInvoker`
* Use `if (logger.isDebugEnabled())` for better performance

The `RetryTemplate` continues to invoke `canRetry(retryPolicy, context)` with retry loop, because some end application may rely on that logic.
Although it looks like overhead to call `canRetry()` twice a retry: it might be heavy operation, e.g. check the state of external system

Fixes gh-10
2014-05-12 17:05:58 +01:00
Dave Syer
6b69ad901b Add proxyTargetClass attribute to @EnableRetry 2014-05-07 05:49:43 -07:00
Dave Syer
bccdaad2b7 Tidy up @Retryable
* Add some docs to backoff()
* Remove unnecessary @Import
2014-05-07 02:38:41 -07:00
Dave Syer
806b380eb6 [maven-release-plugin] prepare for next development iteration 2014-05-03 07:34:13 +01:00
Dave Syer
3c36be54fb [maven-release-plugin] prepare release 1.1.0.RC2 2014-05-03 07:34:08 +01:00
Dave Syer
31ce602c14 Switch back to Java 1.6 2014-05-03 07:33:30 +01:00
Dave Syer
e3f12e1a71 [maven-release-plugin] prepare for next development iteration 2014-04-25 16:54:41 +01:00
Dave Syer
0076eb5b95 [maven-release-plugin] prepare release 1.1.0.RC1 2014-04-25 16:54:36 +01:00
Dave Syer
fa36d64b41 Fix pom for release 2014-04-25 16:53:29 +01:00
Dave Syer
2abfcef18c Add Retryable interface for proxies advising @Retryable beans
This is purely a marker interface, but might be useful for other tools
looking to apply retry advice (they should usually not bother if the
bean already implements Retryable)
2014-04-24 14:17:12 +01:00
Dave Syer
5fc484df58 Parameterize exception type in RetryCallback
So RetryCallback<T, E extends Throwable> and the E parameter appears
in RetryOperations too, making it possible to call it with an unchecked
exception type in the parameter and not catch exceptions.

Users should beware: it's just syntactic sugar, and the actual runtime
type of the exception is never checked at runtime. So, for instance,
declaring a RetryCallback<Object,IllegalArgumentException> doesn't
mean that other Exceptions won't be retried, just that you won't be
able to explicitly throw them if they are checked.

A project using Spring Batch 2.2 was used to test that this works
with user code that uses a library compiled agains Spring Retry 1.0.

Fixes gh-6
2014-04-24 12:18:32 +01:00
Dave Syer
9fb92bccbd Add support for @Recover 2014-04-24 09:41:26 +01:00
Dave Syer
46c3ebde4e Remove OSGi template.mf 2014-04-23 16:22:25 +01:00
Dave Syer
9e2c23e795 Add README from Spring Batch docs 2014-04-23 16:21:11 +01:00
Dave Syer
dab8602a0e Change method signatures to Throwable (from Exception)
This allows use of spring-retry with naughty libraries that use Error
conditions to signal retryable exceptions. Users can still declare their
RetryCallback as "throws Exception" if they want to be conservative.

Also added throwLastExceptionOnExhausted to RetryTemplate to throw
the last exception instead of the ExhaustedRetryException.
2014-04-22 16:55:14 +01:00
Dave Syer
40e7777428 Fix copyrights 2014-04-22 16:29:40 +01:00
Dave Syer
705eabcbf8 Add @EnableRetry support (like @Async) 2014-04-22 16:25:38 +01:00
Dave Syer
06f766a43f Merge pull request #9 from msrb/add_license_text
Add ASL 2.0 license text
2014-01-09 05:54:58 -08:00
Dave Syer
68b9a0fe8a [maven-release-plugin] prepare for next development iteration 2013-10-16 12:34:20 -04:00
Dave Syer
0c420157d0 [maven-release-plugin] prepare release 1.0.3.RELEASE 2013-10-16 12:34:18 -04:00
Michal Srb
697219ae47 Add ASL 2.0 license text 2013-10-16 10:37:25 +02:00
Gary Russell
aad050ba47 AMQP-334 Fix Nested Cause Classification
Consider Foo caused by Bar caused by Baz.

If Bar is categorized TRUE and Baz categorized FALSE, classiy() should
return TRUE (hit on Bar), but it returned FALSE.

The early exit from the cause traversal was not taken because we
were always testing against the top level throwable (Bar).

Add a test to verify this scenario; test against the cause on
each iteration through the loop.
2013-10-02 11:21:22 -04:00
Gary Russell
6396f11878 AMQP-334 Support Unwrapping Exceptions for Retry
With Spring AMQP, the exception thrown to the
RetryTemplate is a ListenerExecutionFailedException
with the business exception in the cause. This means
Exception categorization does not work.

Provide a retry policy/classifier that can examine
exception causes until a match is found.

If so configured, the retry policy should categorize
exceptions by traversing the cause if the current
exception is not itself categorized.
2013-09-28 09:21:48 -04:00
Dave Syer
d9ee15606e Remove JUnit TestCase references 2013-04-05 14:35:06 +01:00
Dave Syer
e9fa48236f Make ExponentialRandomBackOffPolicy more random
The old version was still very prone to multiple threads marching
in lock step.  It is better to use random backoffs (with some
exponential growth).
2012-12-18 13:22:51 +00:00
Gunnar Hillert
907bba3c2c Merge pull request #5 from mminella/BATCH-1718
# By Michael Minella
* mminella-BATCH-1718:
  BATCH-1718: Added optimistic flag
2012-10-03 10:03:15 -04:00
Michael Minella
35fd6e2826 BATCH-1718: Added optimistic flag 2012-10-03 10:00:33 -04:00
Dave Syer
2875065d7c [maven-release-plugin] prepare for next development iteration 2012-06-18 10:26:24 +01:00