INT-4257 Polishing - Subclasses: buildErrorMessage
JIRA: https://jira.spring.io/browse/INT-4257
So that subclasses can also generate error message for conditions such
as message conversion errors.
Polishing - PR Comments
Fix JMS buildErrorMessage Override
Update Copyrights
(cherry picked from commit c665405)
This commit is contained in:
committed by
Artem Bilan
parent
c91b20a20b
commit
089298e6be
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -330,7 +330,8 @@ public class ChannelPublishingJmsMessageListener
|
||||
if (errorChannel == null) {
|
||||
throw e;
|
||||
}
|
||||
errorChannel.send(new ErrorMessage(new MessagingException("Inbound conversion failed for: " + jmsMessage, e)));
|
||||
errorChannel.send(this.gatewayDelegate.buildErrorMessage(
|
||||
new MessagingException("Inbound conversion failed for: " + jmsMessage, e)));
|
||||
errors = true;
|
||||
}
|
||||
if (!errors) {
|
||||
@@ -509,6 +510,10 @@ public class ChannelPublishingJmsMessageListener
|
||||
return super.sendAndReceiveMessage(request);
|
||||
}
|
||||
|
||||
public ErrorMessage buildErrorMessage(Throwable throwable) {
|
||||
return super.buildErrorMessage(null, throwable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComponentType() {
|
||||
if (ChannelPublishingJmsMessageListener.this.expectReply) {
|
||||
|
||||
Reference in New Issue
Block a user