spring batch - Custom counter in itemProcessor -


how 1 implement custom counter in itemprocessor? basic counter work defined here, need counter not include retried items or items in rolled chuncks. maybe there itemstream interface itemprocessor haven't found yet. using springbatch 2.1.7.

edit: batch configuration can found here (using compositeprocessor). i've tried implement counter follows (with no luck): setting itemprocesslistener processors , in afterprocess(i,o) increment counters each processor in cache (cache in each processor). using itemwritelistener processors , in afterwrite() flush cache stepexecution. don't work itemprocesslistener not working compositeprocessors child processors have expected. other idea?

edit: i've removed compositeprocessor , tried use single processor , found out itemprocesslistener.afterprocess called many times. guessing related chunk-processing-mode vs. single-processing-mode. of not retried items of chunk re-processed. i've tried use retrylistener (to disable counter increments if retry in progress), not able configure it. open , close not have been called on retrylistener.

i think stepexecution domain object should fits request.
intercept stepexecutionlistener , access wanted properties.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -