Exception Propagation From Server to Client [INT-3371]
David P Shenba opened INT-3371 and commented
I wish there could be a common exception handling mechanism in Spring Integration. Much like the client Gateway Interface method should be declared with "throws custom-wrapper-exception". In the server side, whenever an exception happens, using interceptors or transformers or automatically, the exceptions should be wrapped to target exception type and sent back to client. In the client side, wherever the gateway method is invoked, it should be surrounded with try catch or the exception should be thrown to next layer. By this there will be clean exception handling in conventional way, instead of getting exception as a normal reply and trying to cast/interpret it in client side.
Reference URL: http://forum.spring.io/forum/spring-projects/integration/jms/747553-exception-handling-in-jms-with-spring-integration
1 votes, 3 watchers
Artem Bilan commented
Good request! Thank you!
One thought on the matter: to follow with Spring MVC experience - HandlerExceptionResolver, or Spring WS - FaultMessageResolver.
Gary Russell commented
JMS is easy because the Spring infrastructure automatically converts the exception to an ObjectMessage.
Others (amqp, tcp) will be more tricky