Skip to content

Commit

Permalink
FINERACT-1724: Made inline loan COB reader and processor job scoped t…
Browse files Browse the repository at this point in the history
…o avoid state sharing
  • Loading branch information
galovics committed Sep 4, 2023
1 parent 0eb2a44 commit f34dfb9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.JobScope;
import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.launch.support.RunIdIncrementer;
import org.springframework.batch.core.listener.ExecutionContextPromotionListener;
Expand Down Expand Up @@ -96,11 +97,13 @@ public Job loanInlineCOBJob() {
.build();
}

@JobScope
@Bean
public InlineCOBLoanItemReader inlineCobWorkerItemReader() {
return new InlineCOBLoanItemReader(loanRepository);
}

@JobScope
@Bean
public InlineCOBLoanItemProcessor inlineCobWorkerItemProcessor() {
return new InlineCOBLoanItemProcessor(cobBusinessStepService);
Expand Down

0 comments on commit f34dfb9

Please sign in to comment.