This is an automated email from the ASF dual-hosted git repository.

arnold pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new c1ef70190 FINERACT-1724: Made inline loan COB reader and processor job 
scoped to avoid state sharing
c1ef70190 is described below

commit c1ef7019089db248ffc4007fd2010b9df7bdf390
Author: Arnold Galovics <[email protected]>
AuthorDate: Mon Sep 4 11:04:31 2023 +0200

    FINERACT-1724: Made inline loan COB reader and processor job scoped to 
avoid state sharing
---
 .../main/java/org/apache/fineract/cob/loan/LoanInlineCOBConfig.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInlineCOBConfig.java
 
b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInlineCOBConfig.java
index d2e570cfc..343c074ed 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInlineCOBConfig.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInlineCOBConfig.java
@@ -30,6 +30,7 @@ import org.apache.fineract.portfolio.loanaccount.domain.Loan;
 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;
@@ -96,11 +97,13 @@ public class LoanInlineCOBConfig {
                 .build();
     }
 
+    @JobScope
     @Bean
     public InlineCOBLoanItemReader inlineCobWorkerItemReader() {
         return new InlineCOBLoanItemReader(loanRepository);
     }
 
+    @JobScope
     @Bean
     public InlineCOBLoanItemProcessor inlineCobWorkerItemProcessor() {
         return new InlineCOBLoanItemProcessor(cobBusinessStepService);

Reply via email to