spring-integration icon indicating copy to clipboard operation
spring-integration copied to clipboard

Exception Propagation From Server to Client [INT-3371]

Open spring-operator opened this issue 11 years ago • 2 comments

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

spring-operator avatar Apr 12 '14 17:04 spring-operator

Artem Bilan commented

Good request! Thank you!

One thought on the matter: to follow with Spring MVC experience - HandlerExceptionResolver, or Spring WS - FaultMessageResolver.

spring-operator avatar Apr 13 '14 01:04 spring-operator

Gary Russell commented

Proof of concept here.

JMS is easy because the Spring infrastructure automatically converts the exception to an ObjectMessage.

Others (amqp, tcp) will be more tricky

spring-operator avatar Jun 20 '14 10:06 spring-operator