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:
committed by
Artem Bilan
parent
a333d25e51
commit
8a44d4da0b
@@ -104,7 +104,7 @@ subprojects { subproject ->
|
|||||||
springGemfireVersion = '1.3.4.RELEASE'
|
springGemfireVersion = '1.3.4.RELEASE'
|
||||||
springSecurityVersion = '3.2.3.RELEASE'
|
springSecurityVersion = '3.2.3.RELEASE'
|
||||||
springSocialTwitterVersion = '1.1.0.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'
|
springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.0.3.RELEASE'
|
||||||
springWsVersion = '2.1.4.RELEASE'
|
springWsVersion = '2.1.4.RELEASE'
|
||||||
xmlUnitVersion = '1.5'
|
xmlUnitVersion = '1.5'
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public class MessagingTemplate extends GenericMessagingTemplate {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a MessagingTemplate with the given default channel.
|
* Create a MessagingTemplate with the given default channel.
|
||||||
|
* @param defaultChannel the default {@link MessageChannel} for {@code send} operations
|
||||||
*/
|
*/
|
||||||
public MessagingTemplate(MessageChannel defaultChannel) {
|
public MessagingTemplate(MessageChannel defaultChannel) {
|
||||||
this.setDefaultChannel(defaultChannel);
|
this.setDefaultChannel(defaultChannel);
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class RequestHandlerRetryAdvice extends AbstractRequestHandlerAdvice
|
|||||||
// Stateless unless a state generator is provided
|
// Stateless unless a state generator is provided
|
||||||
private volatile RetryStateGenerator retryStateGenerator =
|
private volatile RetryStateGenerator retryStateGenerator =
|
||||||
new RetryStateGenerator() {
|
new RetryStateGenerator() {
|
||||||
|
@Override
|
||||||
public RetryState determineRetryState(Message<?> message) {
|
public RetryState determineRetryState(Message<?> message) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -81,7 +82,8 @@ public class RequestHandlerRetryAdvice extends AbstractRequestHandlerAdvice
|
|||||||
messageHolder.set(message);
|
messageHolder.set(message);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return retryTemplate.execute(new RetryCallback<Object>() {
|
return retryTemplate.execute(new RetryCallback<Object, Exception>() {
|
||||||
|
@Override
|
||||||
public Object doWithRetry(RetryContext context) throws Exception {
|
public Object doWithRetry(RetryContext context) throws Exception {
|
||||||
return callback.cloneAndExecute();
|
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());
|
context.setAttribute("message", messageHolder.get());
|
||||||
return true;
|
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) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user