i have a problem handling errors within a flow of spring integration. The flow works like this my entry point is a message driven channel adapter -> router -> filter -> transformer -> service activator -> Database. I've wrote my own error handler using a custom Message Listener Container, and it works as expected, but i need to save the original message into a database when i get an exception.
The problem is that, when i get an exception from the database, the error handle strategy recive a MessageHandleException, but the failedMessage in the exception is the message transformed, how can i get the original message in this case?
Thanks for your help.