Class ClusterJobRepositoryValidator
java.lang.Object
io.github.jchejarla.springbatch.clustering.autoconfigure.ClusterJobRepositoryValidator
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
public class ClusterJobRepositoryValidator
extends Object
implements org.springframework.beans.factory.InitializingBean
Fails fast at startup when clustering is enabled but the active
JobRepository is the in-memory
ResourcelessJobRepository — the Spring Batch 6 default.
Distributed partitioning coordinates through shared, persisted job metadata: the master persists partition step executions, and worker nodes on other JVMs read them back from the same repository to run them. The resourceless repository keeps everything in the heap of a single JVM, so a cluster silently cannot work on it. Rather than let jobs fail deep inside execution with a confusing foreign-key error, this validator stops the context with an actionable message.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ClusterJobRepositoryValidator
public ClusterJobRepositoryValidator()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-