0
votes

Use case: Step 1: ItemReader : Reading Data from Database in chunk of 1000 ItemProcessor : Process those Data. ItemWriter : Write the data in a Map for used in next step

Step 2: ItemReader : Reading the Map ItemProcessor : Process the Map data and get the new object. ItemWriter : Persist the new process object in database.

Now I want the Map the should remain same across the job, Currently I have created a different POJO class for Map and Autowired in the step to use it, but the problem is when ever I new chunk of data loading my Map is reseting but I want to keep the Map object with all its value as it is across the Job execution.

1
Could you add the code to the question?Hansjoerg Wingeier
How big is "huge"?Michael Minella
@MichaelMinella..its a huge key, value pair that's why I not using JobExecutionContext, because in some other place I have read that its not a good practice to set a huge dataset inside JobExecutionContext.PID

1 Answers

0
votes

Try with StepExecutionListener.