SpringBatch rolls back though exception-rollback-exception classes defined

I got the following work:

<batch:job id="importCardsJob" job-repository="jobRepository">
    <batch:step id="importCardStep">
        <batch:tasklet transaction-manager="transactionManager">
            <batch:chunk reader="cardItemReader" writer="cardItemWriter"
                commit-interval="5" skip-limit="10">
                <batch:skippable-exception-classes>
                    <batch:include class="java.lang.Throwable" />   
                </batch:skippable-exception-classes>
            </batch:chunk>
            <batch:no-rollback-exception-classes>
                <batch:include class="job.batch.exceptions.BatchImportException"/>
            </batch:no-rollback-exception-classes>
            <batch:listeners>
                <batch:listener ref="skipListener" />
            </batch:listeners>
        </batch:tasklet>
    </batch:step>
    <batch:listeners>
        <batch:listener ref="authenticationJobListener" />
        <batch:listener ref="jobListener" />
    </batch:listeners>
</batch:job>

csv. - , , . . db, 5 ( comit). , --. csv - , BatchImportException ( ), . , ItemWriter, , . . --. , BatchImportException SpringBatch . :

<batch:no-rollback-exception-classes>
    <batch:include class="java.lang.Throwable"/>
</batch:no-rollback-exception-classes>

SpringBatch . ?

+3

All Articles