Dec 20th, 2012, 09:18 AM
Exception Logging on JMS inbound channel adapter
I'm having an inbound channel adapter that reads messages from a JMS queue (transactional). The incoming messages are passed to another channel for routing and transformation before they're given to my JPA service that stores them in a DB.
Although its all working fine, I wondered how to log exceptions in case something goes wrong in the chain. Despite the transactional rollback I'd really like to log the fact that there was an exception. Do I have to connect an error channel to a logger? Do I need to declare an interceptor that catches, logs and re-throws the exception?
Any suggestion, hint or sample reference, is welcome.