• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Transaction in Spring Batch  RSS feed

Ranch Hand
Posts: 238
Eclipse IDE Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why their is no rollback in case any exception occurs in ItemReader?

Posts: 989
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In which method? readItem? Probably because the errors that can occur are assumed to be possibly temporary ones or record specific meaning that subsequent readItem calls could succeed.
That is the impression one gets from the javadocs. e.g

ParseException - if there is a problem parsing the current record (but the next one may still be valid)
NonTransientResourceException - if there is a fatal exception in the underlying resource. After throwing this exception implementations should endeavour to return null from subsequent calls to read.
UnexpectedInputException - if there is an uncategorised problem with the input data. Assume potentially transient, so subsequent calls to read might succeed.
java.lang.Exception - if an there is a non-specific error.

I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!