Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.此内容没有您所选择的语言版本。
1.20. Configuring Bean Contexts
- To have the contents of the bean context returned at the end of a
Smooks.filterSourceprocess, supply aorg.milyn.delivery.java.JavaResultobject in the call to theSmooks.filterSourcemethod.Example 1.1.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To access the bean contexts at start-up, specify this in the
BeanContextobject. You can retrieve it from theExecutionContextvia thegetBeanContext()method.Example 1.2.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - When adding or retrieving objects from the
BeanContextmake sure you first retrieve abeanIdobject from thebeanIdStore. ThebeanIdobject is a special key that ensures higher performance than string keys, although string keys are also supported. - You must retrieve the
beanIdStorefrom theApplicationContextusing thegetbeanIdStore()method. - To create a
beanIdobject, call theregister("beanId name")method. If you know that the beanId is already registered, then you can retrieve it by calling thegetbeanId("beanId name")method. beanIdobjects areApplicationContext-scoped objects. Register them in your custom visitor implementation's initialization method and then put them in the visitor object as properties. You can then use them in thevisitBeforeandvisitAftermethods. ThebeanIdobjects and thebeanIdStoreare thread-safe.