Unable to log a error record in DB within ItemProcessListener - onProcessError
问题 We have implemented the ItemProcessListener and the SkipListener in the Batch job, which is using the Spring batch. We are able to log the skipped items in the database, without creating a separate transaction. But the when the onProcessError method is invoked in the ItemProcessListener, the transaction is rolled back, due to the corresponding Runtime Exception. We used @Transactional and propagation as REQUIRES_NEW, on the service interface for DB update, but it still rolled back the