Originally Posted by lucasward
hi, thanks for the replies
Originally Posted by Dave Syer
Regarding your observations that that my exception isn't marked for roll back - doesn't my configuration define that the validation exception should roll back? As opposed to the "+" prefix, which does specify "no rollback"?
This is what it states in the sample config here:
<property name="transactionAttribute" value="-org.springframework.batch.item.validator.ValidationException" />
Would I be correct in thinking that if I set this to "+" to not rollback, then I should expect both updates and inserts in my original scenarios (i) and (ii) would be persisted regardless of the exceptions?
If I make my exception skippable:
my batch process stops dead after the first validation exception, but when these validation exceptions occur I do want the database transactions to be rolled back, and I only want the process to exit due to validation exceptions once the specified skip limit has been reached.
<property name="skippableExceptionClasses" value="org.springframework.batch.item.validator.ValidationException"/>
I am already using the HibernateAwareItemWriter:
So, I don't need to worry about flushing the writer?
<property name="sessionFactory" ref="hibernateSessionFactory" />
<property name="delegate" ref="hibernateFXRateWriter" />