0

We need to disable Spring Batch(latest) metadata tables completely, not even use of In-memory database alternatives.

Kindly Address below questions :-

Question 1 : Is it possible to completely Stop Spring Batch Metadata generation/persistence. If so please elaborate with sample implementation.

Question 2: Is it possible if we try via Spring Boot(3.1.1) Implementation by setting any property to restrict spring batch metadata generation.

We trying to create production level implementation.

Could you please guide us to restrict Spring batch Metadata generation either in Spring Batch or Spring Boot base Spring Batch Implementations.

In spring batch 4 , we achieve via MapJobRepositoryFactoryBean which is unfortunately removed in latest version of Spring batch(5.0.2) core package.

We also tried to create custom JobRespository Classes Implementing JobInstanceDao , JobStepExecutionDao , JobExecutionDao) but we face error related to step (Message : IllegalStateException: No Scope registered for scope name 'step')

And its also very complicated to understand (If you have any GitHub repository to refer, kindly share it).

Most of the articles in StackOverFlow , and other resources are referring to the solution achievable in Spring Batch 4.

StackOverFlow : How to disable spring batch 5 metadata table calls or entries

It symbolizes the same thing which are not able to achieve. It will be better if there is sample Implementation available either in maven or Gradle based.

  • 2
    Just use the in-memory database, it was faster then the map based implementation hence the removal of the latter. What is the problem with using an in-memory version? – M. Deinum Jul 31 '23 at 15:20
  • +1 to what M. Deinum said. You referred to this https://stackoverflow.com/a/76470503/5019386, what don't you understand about it? `We also tried to create custom JobRespository Classes Implementing JobInstanceDao , JobStepExecutionDao , JobExecutionDao) but we face error related to step (Message : IllegalStateException: No Scope registered for scope name 'step')`: that error is likely related to an incorrectly scoped component, not the usage of a custom job repository. – Mahmoud Ben Hassine Aug 01 '23 at 16:59

1 Answers1

0

It should be easily possible to disable the use of metadata tables. Even use of in-memory database is going to put load on server.

Is the spring batch 5 works only with metadata tables?

Sujay
  • 3
  • 3
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 05 '23 at 05:59