Praveen Jain
Praveen Jain

Reputation: 77

how to handle exception in service-activator?

in my code i have a flow inbound-channel-adapter -> splitter -> router -> service-activator -> chain

i got some exception in service-activator, how can i write a errorHandler so that whenever exception occurs it will redirect to a errorHandler.

<int:service-activator input-channel="input1" ref="startAction" method="processAction"  output-channel="processTransactionChannel" />

Upvotes: 0

Views: 3763

Answers (1)

Gary Russell
Gary Russell

Reputation: 174554

Add an error-channel to the inbound channel adapter (or its poller if it's polled).

You will get an ErrorMessage with a MessagingException payload with two properties failedMessage and `cause.

Upvotes: 2

Related Questions