Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Patch Available
Description
The component sends always a Done message, even if it receives a fault, with the sendSync method.
I provide a patch to TransformBeanSupport, to send a fault (or error) message if the result of the sendSync is a fault message.
I don't provide a diff file because I have problems accessing the sources on SVN.
This is the code I changed in the onMessageExchange method.
if (transform(exchange, in, out)) {
if (isInAndOut(exchange)) {
exchange.setMessage(out, "out");
if (txSync)
else
{ getDeliveryChannel().send(exchange); } } else {
outExchange.setMessage(out, "in");
if (txSync) {
getDeliveryChannel().sendSync(outExchange);
// HERE THE PATCH BEGINS
// Check result
if (outExchange.getStatus() == ExchangeStatus.DONE)
else if (outExchange.getStatus() == ExchangeStatus.ERROR)
{ log.debug("["+exchange.getExchangeId()+"] | sendSync-> Received an ERROR STATUS AS RESPONSE -> fail"); fail(exchange, outExchange.getError()); }else if (outExchange.getFault() != null)
{ log.info("["+exchange.getExchangeId()+"] | sendSync-> Received a FAULT AS RESPONSE -> fail"); fail(exchange, outExchange.getError()); }// HERE THE PATCH END
} else
{ getDeliveryChannel().send(outExchange); // HERE THE PATCH BEGINS exchange.setStatus(ExchangeStatus.DONE); getDeliveryChannel().send(exchange); // HERE THE PATCH END }}