1

I have a multi threaded step Spring batch job, which reads from database using JdbcPagingItemReader, processes and published messages to a jms queue. I am trying to log every exception encountered at any stage irrespective of skip or not.

I have tried SkipListener which did not work. Since SkipListener respects transaction boundaries,it fails to reach my logger code if the skip-limit is exceeded within the chunk itself. Using a custom SkipPolicy, i am able to log the exception but without item context.

Is there a way to log all exceptions with context?

Varun N
  • 23
  • 4

0 Answers0