This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
I use log4j for logging , anytime any exception happens in my web tier or services classes its always logged . I noticed if exception happens inside a message listener its not getting logged , what is the reason for this and how to fix this ?
You can try a couple of things:
You can then do whatever you like to log messages coming through the someErrorChannel.
You can also create your container like this:
<bean id="twlIncomingQueueMessageListenerContainer" class="yourpackage.TWLSimpleMessageListenerContain er">
<property name="destination" ref="yourDestination" />
<property name="concurrentConsumers" value="5" />
<property name="connectionFactory" ref="yourConnectionFactory" />
<property name="sessionTransacted" value="true" />
<property name="errorHandler" ref="yourMessageListenerErrorHandler"/>
You can log the errors in yourMessageListenerErrorHandler