How to do not rollback transaction on insert failure (Spring+Hibernate)?
<p>I am writing batch processing. I load CSV file (up to  10.000 rows) and I insert them in database. I do not want my processing to fail in case of duplicates.</p>

<p>Is it possible to do such <code>INSERT</code> in single transaction, catch exception for duplicates, proceed with <code>INSERT</code> and commit the transaction?
Or, is there no other way than transaction-per-INSERT pattern?</p>

<p>Currently, my transaction is always rolled back for <code>PersistenceException</code>, no matter how I configure noRollbackFor attribute for my transaction (<code>Transactional</code> annotation).</p>

<p>I use Spring Boot 1.4.2 (with Hibernate 5 and Spring Framework 4.3.5).</p>