From df89bb69ae8b13633dad996526ce857e310ffdb9 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Tue, 20 Oct 2020 12:26:55 +0200 Subject: [PATCH] Update docs about job scope limitations Resolves #1335 --- spring-batch-docs/asciidoc/step.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spring-batch-docs/asciidoc/step.adoc b/spring-batch-docs/asciidoc/step.adoc index 95ebd233d..ff02d3941 100644 --- a/spring-batch-docs/asciidoc/step.adoc +++ b/spring-batch-docs/asciidoc/step.adoc @@ -2468,3 +2468,11 @@ The following example includes a bean that explicitly defines the `JobScope`: ---- ---- + +[NOTE] +==== +There are some practical limitations of using job-scoped beans in multi-threaded +or partitioned steps. Spring Batch does not control the threads spawned in these +use cases, so it is not possible to set them up correctly to use such beans. Hence, +it is not recommended to use job-scoped beans in multi-threaded or partitioned steps. +====