Fix JMS Outbound Gateway

45ae138091 caused the reply destination to overridden to "".
This commit is contained in:
Gary Russell
2017-06-08 10:48:17 -04:00
parent fabc5fb725
commit c7aa508434
2 changed files with 7 additions and 9 deletions

View File

@@ -597,7 +597,7 @@ public class JmsOutboundGateway extends AbstractReplyProducingMessageHandler imp
if (this.replyDestination != null) {
container.setDestination(this.replyDestination);
}
if (StringUtils.hasText(this.replyDestinationName)) {
else if (StringUtils.hasText(this.replyDestinationName)) {
container.setDestinationName(this.replyDestinationName);
}
else {
@@ -1163,15 +1163,11 @@ public class JmsOutboundGateway extends AbstractReplyProducingMessageHandler imp
}
if (logger.isDebugEnabled()) {
if (reply == null) {
if (logger.isDebugEnabled()) {
logger.debug(this.getComponentName() + " Timed out waiting for reply with CorrelationId "
+ correlationId);
}
logger.debug(this.getComponentName() + " Timed out waiting for reply with CorrelationId "
+ correlationId);
}
else {
if (logger.isDebugEnabled()) {
logger.debug(this.getComponentName() + " Obtained reply with CorrelationId " + correlationId);
}
logger.debug(this.getComponentName() + " Obtained reply with CorrelationId " + correlationId);
}
}
return reply;
@@ -1372,7 +1368,7 @@ public class JmsOutboundGateway extends AbstractReplyProducingMessageHandler imp
}
public Destination getReplyDestination() {
Destination replyDest = this.getDestination();
Destination replyDest = getDestination();
if (replyDest == null) {
replyDest = this.replyDestination;
}

View File

@@ -52,6 +52,7 @@
<int-jms:outbound-gateway request-channel="jmsInOptimizedC"
connection-factory="jmsConnectionFactory"
receive-timeout="10000"
request-destination="siOutQueueOptimizedC"
reply-destination="siInQueueOptimizedC"
correlation-key="JMSCorrelationID">
@@ -72,6 +73,7 @@
<int-jms:outbound-gateway request-channel="jmsInNonOptimizedD"
connection-factory="jmsConnectionFactory"
receive-timeout="10000"
request-destination="siOutQueueNonOptimizedD"
reply-destination="siInQueueNonOptimizedD">
<int-jms:reply-listener />