langmi / spring-batch-examples

Collection of Spring Batch Examples

Home Page:http://www.langmi.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to cope with (jpa) exceptions on commit

langmi opened this issue · comments

this forum entry for jpa exception on flush on commit won't be the last and is definitely not the first question to this problem

how to cope with jpa exceptions on commit

some unordered thoughts

  • jpa entitymanager has inconsistent state after runtime exception
  • D. Syer advices to flush inside the writer
    • the JpaItemWriter from spring-integration does that
    • are there any disadvantages with this strategy ?
  • what is the benefit to skip these exceptions, when they happen on commit ?