From 9c5b074f1f71321b0fc73993d67a444d7073e031 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 28 Nov 2011 17:14:47 +0200 Subject: [PATCH 1/2] INT-2274: Manual: Limitation of usage scoped beans in the command scripts for Groovy Control Bus. --- docs/src/reference/docbook/groovy.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/src/reference/docbook/groovy.xml b/docs/src/reference/docbook/groovy.xml index 4378ee37bb..10b73326f2 100644 --- a/docs/src/reference/docbook/groovy.xml +++ b/docs/src/reference/docbook/groovy.xml @@ -80,9 +80,15 @@ customizes it with a GroovyObjectCustomizer, and then executes it. The Control Bus' customizer exposes all the beans in the application context that are annotated with @ManagedResource, implement Spring's - Lifecycleinterface or extend Spring's CustomizableThreadCreator base class + Lifecycle interface or extend Spring's CustomizableThreadCreator base class (e.g. several of the TaskExecutor and TaskScheduler implementations). - + + + Be careful about using managed beans with custom scopes (e.g. 'request') in the Control Bus' command scripts, especially + inside async message flow. If The Control Bus' customizer can't expose a bean + from the application context, it skips BeanCreationException and goes on to other beans. + + If you need to further customize the Groovy objects, you can also provide a reference to a bean that implements org.springframework.scripting.groovy.GroovyObjectCustomizer via From cb3c95154dad12ce594034cb66b7c16d7f23e7df Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Fri, 2 Dec 2011 14:39:52 -0500 Subject: [PATCH 2/2] polishing --- docs/src/reference/docbook/groovy.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/reference/docbook/groovy.xml b/docs/src/reference/docbook/groovy.xml index 10b73326f2..054733d82a 100644 --- a/docs/src/reference/docbook/groovy.xml +++ b/docs/src/reference/docbook/groovy.xml @@ -85,8 +85,10 @@ Be careful about using managed beans with custom scopes (e.g. 'request') in the Control Bus' command scripts, especially - inside async message flow. If The Control Bus' customizer can't expose a bean - from the application context, it skips BeanCreationException and goes on to other beans. + inside an async message flow. If The Control Bus' customizer can't expose a bean + from the application context, it skips that bean. For example, if a custom scope's context is not established, the attempt + to get a bean within that scope will trigger a BeanCreationException. In that case, such a bean + will be ignored, and the customizer will continue with other beans.