Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FINERACT-1724: Made inline loan COB reader and processor job scoped to avoid state sharing #3424

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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