suspendTransaction = configTree.getBooleanAttribute(ListenerTagNames.SUSPEND_TRANSACTION, false);
}
public Message process(Message message) throws ActionProcessingException {
// Zap the faulto and replyto EPRs before sending...
Call call = message.getHeader().getCall();
EPR faultTo = call.getFaultTo();
EPR replyTo = call.getReplyTo();
Object txObject = null;
if(isTransactional() && suspendTransaction) {
try {
txObject = TransactionStrategy.getTransactionStrategy(true).suspend();
} catch (TransactionStrategyException e) {
throw new ActionProcessingException("Error suspending transaction on service '" + serviceInvoker.getService() + "'", e);
}
}
try {
call.setFaultTo(null);
call.setReplyTo(null);
return serviceInvoker.deliverSync(message, timeout);
} catch (Exception e) {
// No real need to reset the EPRs because the pipeline has already captured them, but
// lets do it anyway...
call.setFaultTo(faultTo);
call.setReplyTo(replyTo);
if (failOnException) {
throw new ActionProcessingException("Error delivering message to service '" + serviceInvoker.getService() + "'", e);
} else {
logger.debug("Exception during deliverSync(). Action configured to continue.", e);