The MessageExchangeTemplate's receiveAndForward() method now throws the original Exception if it is a MessagingException. If it is not a MessagingException, then it will be wrapped within a new MessagingException (INT-325).
This commit is contained in:
@@ -240,8 +240,8 @@ public class MessageExchangeTemplate implements InitializingBean {
|
||||
return sent;
|
||||
}
|
||||
catch (Exception e) {
|
||||
MessagingException exception = new MessagingException(
|
||||
"exception occurred in receive-and-forward exchange", e);
|
||||
MessagingException exception = (e instanceof MessagingException) ? (MessagingException) e
|
||||
: new MessagingException("exception occurred in receive-and-forward exchange", e);
|
||||
if (source instanceof MessageDeliveryAware) {
|
||||
((MessageDeliveryAware) source).onFailure(exception);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user