INT-3399 Update spring-retry to 1.1.0

JIRA: https://jira.spring.io/browse/INT-3399

Fix `MessagingTemplate` javadoc warn
This commit is contained in:
Gary Russell
2014-05-02 12:18:56 -04:00
committed by Artem Bilan
parent a333d25e51
commit 8a44d4da0b
3 changed files with 11 additions and 5 deletions

View File

@@ -104,7 +104,7 @@ subprojects { subproject ->
springGemfireVersion = '1.3.4.RELEASE'
springSecurityVersion = '3.2.3.RELEASE'
springSocialTwitterVersion = '1.1.0.RELEASE'
springRetryVersion = '1.0.3.RELEASE'
springRetryVersion = '1.1.0.RELEASE'
springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.0.3.RELEASE'
springWsVersion = '2.1.4.RELEASE'
xmlUnitVersion = '1.5'

View File

@@ -44,6 +44,7 @@ public class MessagingTemplate extends GenericMessagingTemplate {
/**
* Create a MessagingTemplate with the given default channel.
* @param defaultChannel the default {@link MessageChannel} for {@code send} operations
*/
public MessagingTemplate(MessageChannel defaultChannel) {
this.setDefaultChannel(defaultChannel);

View File

@@ -49,6 +49,7 @@ public class RequestHandlerRetryAdvice extends AbstractRequestHandlerAdvice
// Stateless unless a state generator is provided
private volatile RetryStateGenerator retryStateGenerator =
new RetryStateGenerator() {
@Override
public RetryState determineRetryState(Message<?> message) {
return null;
}
@@ -81,7 +82,8 @@ public class RequestHandlerRetryAdvice extends AbstractRequestHandlerAdvice
messageHolder.set(message);
try {
return retryTemplate.execute(new RetryCallback<Object>() {
return retryTemplate.execute(new RetryCallback<Object, Exception>() {
@Override
public Object doWithRetry(RetryContext context) throws Exception {
return callback.cloneAndExecute();
}
@@ -102,15 +104,18 @@ public class RequestHandlerRetryAdvice extends AbstractRequestHandlerAdvice
}
}
public <T> boolean open(RetryContext context, RetryCallback<T> callback) {
@Override
public <T, E extends Throwable> boolean open(RetryContext context, RetryCallback<T, E> callback) {
context.setAttribute("message", messageHolder.get());
return true;
}
public <T> void close(RetryContext context, RetryCallback<T> callback, Throwable throwable) {
@Override
public <T, E extends Throwable> void close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) {
}
public <T> void onError(RetryContext context, RetryCallback<T> callback, Throwable throwable) {
@Override
public <T, E extends Throwable> void onError(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) {
}
}