The class MessageInterceptionAdvice has the following code:
Code:
....
Message outputMessage = null;
try {
outputMessage = (Message) mi.proceed();
} finally {
if (outputMessage != null) {
Stack<MessageInterceptor> postProcessStack = new Stack<MessageInterceptor>();
postProcessStack.addAll(this.messageInterceptors);
while (!postProcessStack.empty()) {
MessageInterceptor interceptor = postProcessStack.pop();
outputMessage = interceptor.postProcess(context, inputMessage, outputMessage);
}
}
}
when mi.proceed() throw an exception outputMessage is always null so the if sentence in the finally is false and thats the reason why the postProcess is not called.