public void addMessageProcessorPathElements(MessageProcessorPathElement pathElement)
{
String processorsPrefix = "processors";
String esPrefix = "es";
MessageProcessorPathElement processorPathElement = pathElement.addChild(processorsPrefix);
//Only MP till first InterceptingMessageProcessor should be used to generate the Path,
// since the next ones will be generated by the InterceptingMessageProcessor because they are added as an inned chain
List<MessageProcessor> filteredMessageProcessorList = new ArrayList<MessageProcessor>();
for (MessageProcessor messageProcessor : getMessageProcessors())
{
if(messageProcessor instanceof InterceptingMessageProcessor){
filteredMessageProcessorList.add(messageProcessor);
break;
}else{
filteredMessageProcessorList.add(messageProcessor);
}
}
NotificationUtils.addMessageProcessorPathElements(filteredMessageProcessorList, processorPathElement);
if (exceptionListener instanceof MessageProcessorContainer)
{
String esGlobalName = getExceptionStrategyGlobalName();
MessageProcessorPathElement exceptionStrategyPathElement = pathElement;
if (esGlobalName != null)
{
exceptionStrategyPathElement = exceptionStrategyPathElement.addChild(esGlobalName);
}
exceptionStrategyPathElement = exceptionStrategyPathElement.addChild(esPrefix);
((MessageProcessorContainer) exceptionListener).addMessageProcessorPathElements(exceptionStrategyPathElement);
}
}