You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/01/07 12:43:41 UTC

[camel] branch master updated: bean component now supports scope option (#3464)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 6d57ea2  bean component now supports scope option (#3464)
6d57ea2 is described below

commit 6d57ea237c3d5b09d1098d5982d5c6ef0f051ad0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jan 7 13:43:29 2020 +0100

    bean component now supports scope option (#3464)
    
    CAMEL-14359: camel-bean is now singleton scoped by default. Add scope option so you can configure this. And added new request scope.
---
 .../camel-bean/src/main/docs/bean-component.adoc   | 12 +--
 .../camel-bean/src/main/docs/class-component.adoc  | 12 +--
 .../component/bean/AbstractBeanProcessor.java      | 22 +++---
 .../apache/camel/component/bean/BeanComponent.java | 44 ++++++++---
 .../apache/camel/component/bean/BeanEndpoint.java  | 63 +++++++++------
 .../apache/camel/component/bean/BeanHolder.java    |  3 +-
 .../apache/camel/component/bean/BeanProcessor.java | 13 +--
 .../camel/component/bean/ConstantBeanHolder.java   |  3 +-
 .../bean/ConstantStaticTypeBeanHolder.java         |  3 +-
 .../component/bean/ConstantTypeBeanHolder.java     |  5 +-
 .../bean/DefaultBeanProcessorFactory.java          | 25 +++---
 .../apache/camel/component/bean/RegistryBean.java  | 11 ++-
 .../camel/component/bean/RequestBeanHolder.java    | 65 +++++++++++++++
 .../camel/component/beanclass/ClassEndpoint.java   |  2 +-
 .../apache/camel/language/bean/BeanExpression.java | 18 ++---
 .../apache/camel/language/bean/BeanLanguage.java   | 10 ---
 ...RestOpenApiReaderEnableVendorExtensionTest.java |  3 +
 .../RestOpenApiReaderModelApiSecurityTest.java     |  6 +-
 .../RestOpenApiReaderModelBookOrderTest.java       |  4 +-
 .../camel/openapi/RestOpenApiReaderModelTest.java  |  3 +
 ...pringRestOpenApiReaderModelApiSecurityTest.java |  6 +-
 ...SpringRestOpenApiReaderModelApiSecurityTest.xml |  2 +
 .../apache/camel/spring/config/errorHandler.xml    |  2 +-
 ...RestSwaggerReaderEnableVendorExtensionTest.java |  3 +
 .../RestSwaggerReaderModelApiSecurityTest.java     |  3 +
 .../RestSwaggerReaderModelBookOrderTest.java       |  3 +
 .../camel/swagger/RestSwaggerReaderModelTest.java  |  3 +
 ...SpringRestSwaggerReaderModelApiSecurityTest.xml |  3 +
 .../src/main/java/org/apache/camel/BeanScope.java  | 17 ++--
 .../org/apache/camel/spi/BeanProcessorFactory.java |  5 +-
 .../impl/converter/BaseTypeConverterRegistry.java  |  1 -
 .../src/main/docs/eips/bean-eip.adoc               | 16 +++-
 .../org/apache/camel/model/BeanDefinition.java     | 44 +++++++++--
 .../java/org/apache/camel/model/LogDefinition.java |  2 +-
 .../apache/camel/model/ProcessorDefinition.java    | 92 +++++++++++++---------
 .../java/org/apache/camel/reifier/BeanReifier.java | 13 +--
 .../org/apache/camel/reifier/ProcessorReifier.java |  1 -
 .../camel/component/bean/BeanEndpointTest.java     | 12 +--
 .../bean/BeanExplicitMethodAmbiguousTest.java      |  7 +-
 .../camel/component/bean/BeanLifecycleTest.java    |  7 +-
 .../camel/component/bean/BeanNoCacheTest.java      |  3 +-
 .../camel/component/bean/BeanRefNoCacheTest.java   |  3 +-
 .../camel/component/bean/BeanRegistryBeanTest.java | 10 +--
 .../apache/camel/component/bean/MyRequestBean.java | 18 ++---
 .../camel/component/bean/NewInstanceTest.java      |  3 +-
 ...st.java => RequestScopedBeanComponentTest.java} | 39 +++------
 .../component/bean/RequestScopedBeanEIPTest.java   | 27 ++++---
 .../bean/issues/BeanThisAdviceWithIssueTest.java   |  3 +-
 .../org/apache/camel/processor/BeanCachedTest.java |  1 +
 ...{BeanCachedTest.java => BeanSingletonTest.java} |  9 +--
 .../runtimecatalog/impl/JSonSchemaHelperTest.java  |  7 +-
 .../endpoint/dsl/BeanEndpointBuilderFactory.java   | 81 +++++++++++++++----
 .../endpoint/dsl/ClassEndpointBuilderFactory.java  | 85 +++++++++++++++-----
 .../modules/ROOT/pages/bean-component.adoc         | 12 +--
 .../modules/ROOT/pages/class-component.adoc        | 12 +--
 docs/components/modules/ROOT/pages/index.adoc      |  2 +-
 docs/user-manual/modules/ROOT/pages/bean-eip.adoc  | 16 +++-
 .../modules/ROOT/pages/camel-3x-upgrade-guide.adoc |  9 +++
 58 files changed, 603 insertions(+), 306 deletions(-)

diff --git a/components/camel-bean/src/main/docs/bean-component.adoc b/components/camel-bean/src/main/docs/bean-component.adoc
index dbf6d3b..e754008 100644
--- a/components/camel-bean/src/main/docs/bean-component.adoc
+++ b/components/camel-bean/src/main/docs/bean-component.adoc
@@ -23,14 +23,15 @@ the Registry
 
 
 // component options: START
-The Bean component supports 4 options, which are listed below.
+The Bean component supports 5 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *cache* (advanced) | If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope. |  | Boolean
+| *cache* (producer) | *Deprecated* Use singleton option instead. | true | Boolean
+| *scope* (producer) | Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent threads is calling the bean at the same time. When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean while processing a request and you want to call the same bean instance multiple times while  [...]
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
@@ -58,17 +59,18 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (6 parameters):
+=== Query Parameters (7 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *cache* (common) | If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope. |  | Boolean
+| *cache* (common) | *Deprecated* Use scope option instead. |  | Boolean
 | *method* (common) | Sets the name of the method to invoke on the bean |  | String
-| *parameters* (common) | Used for configuring additional properties on the bean |  | Map
+| *scope* (common) | Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent threads is calling the bean at the same time. When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean while processing a request and you want to call the same bean instance multiple times while pr [...]
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
+| *parameters* (advanced) | Used for configuring additional properties on the bean |  | Map
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 |===
 // endpoint options: END
diff --git a/components/camel-bean/src/main/docs/class-component.adoc b/components/camel-bean/src/main/docs/class-component.adoc
index ba2fb48..62aad4e 100644
--- a/components/camel-bean/src/main/docs/class-component.adoc
+++ b/components/camel-bean/src/main/docs/class-component.adoc
@@ -26,14 +26,15 @@ bean.
 
 
 // component options: START
-The Class component supports 4 options, which are listed below.
+The Class component supports 5 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *cache* (advanced) | If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope. |  | Boolean
+| *cache* (producer) | *Deprecated* Use singleton option instead. | true | Boolean
+| *scope* (producer) | Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent threads is calling the bean at the same time. When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean while processing a request and you want to call the same bean instance multiple times while  [...]
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
@@ -61,17 +62,18 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (6 parameters):
+=== Query Parameters (7 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *cache* (common) | If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope. |  | Boolean
+| *cache* (common) | *Deprecated* Use scope option instead. |  | Boolean
 | *method* (common) | Sets the name of the method to invoke on the bean |  | String
-| *parameters* (common) | Used for configuring additional properties on the bean |  | Map
+| *scope* (common) | Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent threads is calling the bean at the same time. When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean while processing a request and you want to call the same bean instance multiple times while pr [...]
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
+| *parameters* (advanced) | Used for configuring additional properties on the bean |  | Map
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 |===
 // endpoint options: END
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
index 7ac80a8..1964498 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.bean;
 
 import org.apache.camel.AsyncCallback;
+import org.apache.camel.BeanScope;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
@@ -35,7 +36,7 @@ public abstract class AbstractBeanProcessor extends AsyncProcessorSupport {
     private transient Processor processor;
     private transient boolean lookupProcessorDone;
     private final Object lock = new Object();
-    private Boolean cache;
+    private BeanScope scope;
     private String method;
     private boolean shorthandMethod;
 
@@ -68,7 +69,7 @@ public abstract class AbstractBeanProcessor extends AsyncProcessorSupport {
         Object bean;
         BeanInfo beanInfo;
         try {
-            bean = beanHolder.getBean();
+            bean = beanHolder.getBean(exchange);
             // get bean info for this bean instance (to avoid thread issue)
             beanInfo = beanHolder.getBeanInfo(bean);
             if (beanInfo == null) {
@@ -88,7 +89,8 @@ public abstract class AbstractBeanProcessor extends AsyncProcessorSupport {
             Processor target = getProcessor();
             if (target == null) {
                 // only attempt to lookup the processor once or nearly once
-                boolean allowCache = cache == null || cache; // allow cache by default
+                // allow cache by default or if the scope is singleton
+                boolean allowCache = scope == null || scope == BeanScope.Singleton;
                 if (allowCache) {
                     if (!lookupProcessorDone) {
                         synchronized (lock) {
@@ -157,7 +159,7 @@ public abstract class AbstractBeanProcessor extends AsyncProcessorSupport {
     }
 
     public Object getBean() {
-        return beanHolder.getBean();
+        return beanHolder.getBean(null);
     }
 
     // Properties
@@ -167,12 +169,12 @@ public abstract class AbstractBeanProcessor extends AsyncProcessorSupport {
         return method;
     }
 
-    public Boolean getCache() {
-        return cache;
+    public BeanScope getScope() {
+        return scope;
     }
 
-    public void setCache(Boolean cache) {
-        this.cache = cache;
+    public void setScope(BeanScope scope) {
+        this.scope = scope;
     }
 
     /**
@@ -208,7 +210,7 @@ public abstract class AbstractBeanProcessor extends AsyncProcessorSupport {
             try {
                 // Start the bean if it implements Service interface and if cached
                 // so meant to be reused
-                ServiceHelper.startService(beanHolder.getBean());
+                ServiceHelper.startService(beanHolder.getBean(null));
             } catch (NoSuchBeanException e) {
                 // ignore
             }
@@ -223,7 +225,7 @@ public abstract class AbstractBeanProcessor extends AsyncProcessorSupport {
             try {
                 // Stop the bean if it implements Service interface and if cached
                 // so meant to be reused
-                ServiceHelper.stopService(beanHolder.getBean());
+                ServiceHelper.stopService(beanHolder.getBean(null));
             } catch (NoSuchBeanException e) {
                 // ignore
             }
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanComponent.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanComponent.java
index 5b27e1b..4929e22 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanComponent.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanComponent.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.bean;
 
 import java.util.Map;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.Endpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.DefaultComponent;
@@ -26,7 +27,7 @@ import org.apache.camel.support.LRUCacheFactory;
 import org.apache.camel.util.PropertiesHelper;
 
 /**
- * The <a href="http://camel.apache.org/bean.html">Bean Component</a> is for invoking Java beans from Camel.
+ * The bean component is for invoking Java beans from Camel.
  */
 @org.apache.camel.spi.annotations.Component("bean")
 public class BeanComponent extends DefaultComponent {
@@ -36,9 +37,19 @@ public class BeanComponent extends DefaultComponent {
     @SuppressWarnings("unchecked")
     private final Map<BeanInfoCacheKey, BeanInfo> beanInfoCache = LRUCacheFactory.newLRUSoftCache(1000);
 
-    @Metadata(label = "advanced", description = "If enabled, Camel will cache the result of the first Registry look-up."
-        + " Cache can be enabled if the bean in the Registry is defined as a singleton scope.")
+    @Deprecated
+    @Metadata(defaultValue = "true", description = "Use singleton option instead.")
     private Boolean cache;
+    @Metadata(defaultValue = "Singleton", description = "Scope of bean."
+            + " When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint."
+            + " The bean should be thread-safe in case concurrent threads is calling the bean at the same time."
+            + " When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean"
+            + " while processing a request and you want to call the same bean instance multiple times while processing the request."
+            + " The bean does not have to be thread-safe as the instance is only called from the same request."
+            + " When using delegate scope, then the bean will be looked up or created per call. However in case of lookup then this is delegated "
+            + " to the bean registry such as Spring or CDI (if in use), which depends on their configuration can act as either singleton or prototype scope."
+            + " so when using prototype then this depends on the delegated registry.")
+    private BeanScope scope = BeanScope.Singleton;
 
     public BeanComponent() {
     }
@@ -49,7 +60,10 @@ public class BeanComponent extends DefaultComponent {
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         BeanEndpoint endpoint = new BeanEndpoint(uri, this);
         endpoint.setBeanName(remaining);
-        endpoint.setCache(cache);
+        if (cache != null) {
+            endpoint.setCache(cache);
+        }
+        endpoint.setScope(scope);
         setProperties(endpoint, parameters);
 
         // the bean.xxx options is for the bean
@@ -75,15 +89,25 @@ public class BeanComponent extends DefaultComponent {
         beanInfoCache.clear();
     }
 
+    @Deprecated
     public Boolean getCache() {
-        return cache;
+        return scope == BeanScope.Singleton;
     }
 
-    /**
-     * If enabled, Camel will cache the result of the first Registry look-up.
-     * Cache can be enabled if the bean in the Registry is defined as a singleton scope.
-     */
+    @Deprecated
     public void setCache(Boolean cache) {
-        this.cache = cache;
+        if (cache) {
+            scope = BeanScope.Singleton;
+        } else {
+            scope = BeanScope.Prototype;
+        }
+    }
+
+    public BeanScope getScope() {
+        return scope;
+    }
+
+    public void setScope(BeanScope scope) {
+        this.scope = scope;
     }
 }
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
index 8ceac11..5c5214c 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.bean;
 
 import java.util.Map;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.Component;
 import org.apache.camel.Consumer;
 import org.apache.camel.ExchangePattern;
@@ -30,7 +31,7 @@ import org.apache.camel.spi.UriPath;
 import org.apache.camel.support.DefaultEndpoint;
 
 /**
- * The <a href="http://camel.apache.org/bean.html">bean component</a> is for invoking Java beans from Camel.
+ * The bean component is for invoking Java beans from Camel.
  */
 @UriEndpoint(firstVersion = "1.0.0", scheme = "bean", title = "Bean", syntax = "bean:beanName", producerOnly = true, label = "core,java")
 public class BeanEndpoint extends DefaultEndpoint {
@@ -40,10 +41,20 @@ public class BeanEndpoint extends DefaultEndpoint {
     private String beanName;
     @UriParam(label = "common", description = "Sets the name of the method to invoke on the bean")
     private String method;
-    @UriParam(label = "common", description = "If enabled, Camel will cache the result of the first Registry look-up."
-            + " Cache can be enabled if the bean in the Registry is defined as a singleton scope.")
+    @Deprecated
+    @UriParam(label = "common", description = "Use scope option instead.")
     private Boolean cache;
-    @UriParam(prefix = "bean.", label = "common", description = "Used for configuring additional properties on the bean", multiValue = true)
+    @UriParam(label = "common", defaultValue = "Singleton", description = "Scope of bean."
+            + " When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint."
+            + " The bean should be thread-safe in case concurrent threads is calling the bean at the same time."
+            + " When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean"
+            + " while processing a request and you want to call the same bean instance multiple times while processing the request."
+            + " The bean does not have to be thread-safe as the instance is only called from the same request."
+            + " When using prototype scope, then the bean will be looked up or created per call. However in case of lookup then this is delegated "
+            + " to the bean registry such as Spring or CDI (if in use), which depends on their configuration can act as either singleton or prototype scope."
+            + " so when using prototype then this depends on the delegated registry.")
+    private BeanScope scope = BeanScope.Singleton;
+    @UriParam(prefix = "bean.", label = "advanced", description = "Used for configuring additional properties on the bean", multiValue = true)
     private Map<String, Object> parameters;
 
     public BeanEndpoint() {
@@ -83,17 +94,22 @@ public class BeanEndpoint extends DefaultEndpoint {
             BeanHolder holder = getBeanHolder();
             if (holder == null) {
                 RegistryBean registryBean = new RegistryBean(getCamelContext(), beanName);
-                if (isCache()) {
+                if (scope == BeanScope.Singleton) {
+                    // if singleton then create a cached holder that use the same singleton instance
                     holder = registryBean.createCacheHolder();
                 } else {
                     holder = registryBean;
                 }
             }
+            if (scope == BeanScope.Request) {
+                // wrap in registry scoped
+                holder = new RequestBeanHolder(holder);
+            }
             processor = new BeanProcessor(holder);
             if (method != null) {
                 processor.setMethod(method);
             }
-            processor.setCache(cache);
+            processor.setScope(scope);
             if (parameters != null) {
                 setProperties(processor, parameters);
             }
@@ -113,36 +129,36 @@ public class BeanEndpoint extends DefaultEndpoint {
         return beanName;
     }
 
-    /**
-     * Sets the name of the bean to invoke
-     */
     public void setBeanName(String beanName) {
         this.beanName = beanName;
     }
 
-    public boolean isCache() {
-        return cache != null ? cache : false;
-    }
-
+    @Deprecated
     public Boolean getCache() {
-        return cache;
+        return scope == BeanScope.Singleton;
     }
 
-    /**
-     * If enabled, Camel will cache the result of the first Registry look-up.
-     * Cache can be enabled if the bean in the Registry is defined as a singleton scope.
-     */
+    @Deprecated
     public void setCache(Boolean cache) {
-        this.cache = cache;
+        if (cache) {
+            scope = BeanScope.Singleton;
+        } else {
+            scope = BeanScope.Prototype;
+        }
+    }
+
+    public BeanScope getScope() {
+        return scope;
+    }
+
+    public void setScope(BeanScope scope) {
+        this.scope = scope;
     }
 
     public String getMethod() {
         return method;
     }
 
-    /**
-     * Sets the name of the method to invoke on the bean
-     */
     public void setMethod(String method) {
         this.method = method;
     }
@@ -159,9 +175,6 @@ public class BeanEndpoint extends DefaultEndpoint {
         return parameters;
     }
 
-    /**
-     * Used for configuring additional properties on the bean
-     */
     public void setParameters(Map<String, Object> parameters) {
         this.parameters = parameters;
     }
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanHolder.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanHolder.java
index 22bcc98..af56127 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanHolder.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanHolder.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.bean;
 
+import org.apache.camel.Exchange;
 import org.apache.camel.NoSuchBeanException;
 import org.apache.camel.Processor;
 
@@ -29,7 +30,7 @@ public interface BeanHolder {
      *
      * @throws NoSuchBeanException is thrown if the bean cannot be found.
      */
-    Object getBean() throws NoSuchBeanException;
+    Object getBean(Exchange exchange) throws NoSuchBeanException;
 
     /**
      * Gets a {@link Processor} for this bean, if supported.
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanProcessor.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanProcessor.java
index b545deb..a95cd4b 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanProcessor.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanProcessor.java
@@ -20,6 +20,7 @@ import java.util.concurrent.CompletableFuture;
 
 import org.apache.camel.AsyncCallback;
 import org.apache.camel.AsyncProcessor;
+import org.apache.camel.BeanScope;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
@@ -76,16 +77,16 @@ public class BeanProcessor extends ServiceSupport implements AsyncProcessor {
         return delegate.getMethod();
     }
 
-    public Boolean getCache() {
-        return delegate.getCache();
+    public void setMethod(String method) {
+        delegate.setMethod(method);
     }
 
-    public void setCache(Boolean cache) {
-        delegate.setCache(cache);
+    public BeanScope getScope() {
+        return delegate.getScope();
     }
 
-    public void setMethod(String method) {
-        delegate.setMethod(method);
+    public void setScope(BeanScope scope) {
+        delegate.setScope(scope);
     }
 
     public boolean isShorthandMethod() {
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantBeanHolder.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantBeanHolder.java
index bbb758f..9f42b16 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantBeanHolder.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantBeanHolder.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.bean;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.support.CamelContextHelper;
 import org.apache.camel.util.ObjectHelper;
@@ -51,7 +52,7 @@ public class ConstantBeanHolder implements BeanHolder {
     }
 
     @Override
-    public Object getBean()  {
+    public Object getBean(Exchange exchange)  {
         return bean;
     }
 
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java
index 55b7f12..f87fd78 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.bean;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
 
 /**
  * A constant {@link org.apache.camel.component.bean.BeanHolder} for a class or static class
@@ -29,7 +30,7 @@ public class ConstantStaticTypeBeanHolder extends ConstantTypeBeanHolder {
     }
 
     @Override
-    public Object getBean() {
+    public Object getBean(Exchange exchange) {
         // we cannot create a bean as there is no default constructor
         return null;
     }
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantTypeBeanHolder.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantTypeBeanHolder.java
index 400330e..3802380 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantTypeBeanHolder.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantTypeBeanHolder.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.bean;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.util.ObjectHelper;
 
@@ -45,7 +46,7 @@ public class ConstantTypeBeanHolder implements BeanTypeHolder {
      * @return a new {@link org.apache.camel.component.bean.BeanHolder} that has cached the lookup of the bean.
      */
     public ConstantBeanHolder createCacheHolder() throws Exception {
-        Object bean = getBean();
+        Object bean = getBean(null);
         return new ConstantBeanHolder(bean, beanInfo);
     }
 
@@ -55,7 +56,7 @@ public class ConstantTypeBeanHolder implements BeanTypeHolder {
     }
 
     @Override
-    public Object getBean()  {
+    public Object getBean(Exchange exchange)  {
         // only create a bean if we have a default no-arg constructor
         if (beanInfo.hasPublicNoArgConstructors()) {
             return getBeanInfo().getCamelContext().getInjector().newInstance(type, false);
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/DefaultBeanProcessorFactory.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/DefaultBeanProcessorFactory.java
index a9b6feb..f5748bd 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/DefaultBeanProcessorFactory.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/DefaultBeanProcessorFactory.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.bean;
 
 import java.lang.reflect.Method;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Processor;
 import org.apache.camel.RuntimeCamelException;
@@ -42,27 +43,29 @@ public final class DefaultBeanProcessorFactory implements BeanProcessorFactory {
 
     @Override
     public Processor createBeanProcessor(CamelContext camelContext, Object bean, String beanType, Class<?> beanClass, String ref,
-                                         String method, boolean cacheBean) throws Exception {
+                                         String method, BeanScope scope) throws Exception {
 
         BeanProcessor answer;
         Class<?> clazz = bean != null ? bean.getClass() : null;
         BeanHolder beanHolder;
 
         if (ObjectHelper.isNotEmpty(ref)) {
-            // lets cache by default
-            if (cacheBean) {
+            if (scope == BeanScope.Singleton) {
                 // cache the registry lookup which avoids repeat lookup in the registry
                 beanHolder = new RegistryBean(camelContext, ref).createCacheHolder();
                 // bean holder will check if the bean exists
-                bean = beanHolder.getBean();
+                bean = beanHolder.getBean(null);
             } else {
                 // we do not cache so we invoke on-demand
                 beanHolder = new RegistryBean(camelContext, ref);
             }
+            if (scope == BeanScope.Request) {
+                // wrap in registry scoped holder
+                beanHolder = new RequestBeanHolder(beanHolder);
+            }
             answer = new BeanProcessor(beanHolder);
         } else {
             if (bean == null) {
-
                 if (beanType == null && beanClass == null) {
                     throw new IllegalArgumentException("bean, ref or beanType must be provided");
                 }
@@ -79,7 +82,7 @@ public final class DefaultBeanProcessorFactory implements BeanProcessorFactory {
                 }
 
                 // attempt to create bean using injector which supports auto-wiring
-                if (cacheBean && camelContext.getInjector().supportsAutoWiring()) {
+                if (scope == BeanScope.Singleton && camelContext.getInjector().supportsAutoWiring()) {
                     try {
                         LOG.debug("Attempting to create new bean instance from class: {} via auto-wiring enabled", clazz);
                         bean = CamelContextHelper.newInstance(camelContext, clazz);
@@ -89,7 +92,7 @@ public final class DefaultBeanProcessorFactory implements BeanProcessorFactory {
                 }
 
                 // create a bean if there is a default public no-arg constructor
-                if (bean == null && cacheBean && ObjectHelper.hasDefaultPublicNoArgConstructor(clazz)) {
+                if (bean == null && scope == BeanScope.Singleton && ObjectHelper.hasDefaultPublicNoArgConstructor(clazz)) {
                     LOG.debug("Class has default no-arg constructor so creating a new bean instance: {}", clazz);
                     bean = CamelContextHelper.newInstance(camelContext, clazz);
                     ObjectHelper.notNull(bean, "bean", this);
@@ -107,7 +110,7 @@ public final class DefaultBeanProcessorFactory implements BeanProcessorFactory {
             if (bean != null) {
                 beanHolder = new ConstantBeanHolder(bean, camelContext);
             } else {
-                if (cacheBean && ObjectHelper.hasDefaultPublicNoArgConstructor(clazz)) {
+                if (scope == BeanScope.Singleton && ObjectHelper.hasDefaultPublicNoArgConstructor(clazz)) {
                     // we can only cache if we can create an instance of the bean, and for that we need a public constructor
                     beanHolder = new ConstantTypeBeanHolder(clazz, camelContext).createCacheHolder();
                 } else {
@@ -119,6 +122,10 @@ public final class DefaultBeanProcessorFactory implements BeanProcessorFactory {
                     }
                 }
             }
+            if (scope == BeanScope.Request) {
+                // wrap in registry scoped holder
+                beanHolder = new RequestBeanHolder(beanHolder);
+            }
             answer = new BeanProcessor(beanHolder);
         }
 
@@ -129,7 +136,7 @@ public final class DefaultBeanProcessorFactory implements BeanProcessorFactory {
             // check there is a method with the given name, and leverage BeanInfo for that
             // which we only do if we are caching the bean as otherwise we will create a bean instance for this check
             // which we only want to do if we cache the bean
-            if (cacheBean) {
+            if (scope == BeanScope.Singleton) {
                 BeanInfo beanInfo = beanHolder.getBeanInfo();
                 if (bean != null) {
                     // there is a bean instance, so check for any methods
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/RegistryBean.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/RegistryBean.java
index b871c8f..d8376fd 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/RegistryBean.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/RegistryBean.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.bean;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
 import org.apache.camel.NoSuchBeanException;
 import org.apache.camel.Processor;
 import org.apache.camel.spi.Registry;
@@ -59,18 +60,16 @@ public class RegistryBean implements BeanHolder {
     }
 
     /**
-     * Creates a cached and constant {@link org.apache.camel.component.bean.BeanHolder} from this holder.
-     *
-     * @return a new {@link org.apache.camel.component.bean.BeanHolder} that has cached the lookup of the bean.
+     * Creates a singleton (cached and constant) {@link org.apache.camel.component.bean.BeanHolder} from this holder.
      */
     public ConstantBeanHolder createCacheHolder() {
-        Object bean = getBean();
+        Object bean = getBean(null);
         BeanInfo info = createBeanInfo(bean);
         return new ConstantBeanHolder(bean, info);
     }
 
     @Override
-    public Object getBean() throws NoSuchBeanException {
+    public Object getBean(Exchange exchange) throws NoSuchBeanException {
         // must always lookup bean first
         Object value = lookupBean();
 
@@ -110,7 +109,7 @@ public class RegistryBean implements BeanHolder {
     @Override
     public BeanInfo getBeanInfo() {
         if (beanInfo == null) {
-            Object bean = getBean();
+            Object bean = getBean(null);
             this.beanInfo = createBeanInfo(bean);
         }
         return beanInfo;
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/RequestBeanHolder.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/RequestBeanHolder.java
new file mode 100644
index 0000000..ce4d789
--- /dev/null
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/RequestBeanHolder.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.bean;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.NoSuchBeanException;
+import org.apache.camel.Processor;
+
+/**
+ * Request scoped {@link BeanHolder} wrapper.
+ */
+public class RequestBeanHolder implements BeanHolder {
+
+    private final BeanHolder holder;
+    private final String key;
+
+    public RequestBeanHolder(BeanHolder holder) {
+        this.holder = holder;
+        this.key = "CamelBeanRequestScope-" + holder.getBeanInfo().getType().getName();
+    }
+
+    @Override
+    public Object getBean(Exchange exchange) throws NoSuchBeanException {
+        Object bean = exchange.getProperty(key);
+        if (bean == null) {
+            bean = holder.getBean(exchange);
+            exchange.setProperty(key, bean);
+        }
+        return bean;
+    }
+
+    @Override
+    public Processor getProcessor() {
+        return null;
+    }
+
+    @Override
+    public boolean supportProcessor() {
+        return false;
+    }
+
+    @Override
+    public BeanInfo getBeanInfo() {
+        return holder.getBeanInfo();
+    }
+
+    @Override
+    public BeanInfo getBeanInfo(Object bean) {
+        return holder.getBeanInfo(bean);
+    }
+}
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java b/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
index 508d61a..5f85a65 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
@@ -21,7 +21,7 @@ import org.apache.camel.component.bean.BeanEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 
 /**
- * The <a href="http://camel.apache.org/class.html">class component</a> is for invoking Java classes (Java beans) from Camel.
+ * The Class component is for invoking Java classes (Java beans) from Camel.
  */
 @UriEndpoint(firstVersion = "2.4.0", scheme = "class", title = "Class", syntax = "class:beanName", producerOnly = true, label = "core,java")
 public class ClassEndpoint extends BeanEndpoint {
diff --git a/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanExpression.java b/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanExpression.java
index b2dea7a..1219fe2 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanExpression.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanExpression.java
@@ -151,7 +151,7 @@ public class BeanExpression implements Expression, Predicate, AfterPropertiesCon
                 if (e instanceof RuntimeBeanExpressionException) {
                     throw (RuntimeBeanExpressionException) e;
                 }
-                throw new RuntimeBeanExpressionException(exchange, getBeanName(beanName, beanHolder), method, e);
+                throw new RuntimeBeanExpressionException(exchange, getBeanName(exchange, beanName, beanHolder), method, e);
             }
         } else {
             // regular non ognl invocation
@@ -161,7 +161,7 @@ public class BeanExpression implements Expression, Predicate, AfterPropertiesCon
                 if (e instanceof RuntimeBeanExpressionException) {
                     throw (RuntimeBeanExpressionException) e;
                 }
-                throw new RuntimeBeanExpressionException(exchange, getBeanName(beanName, beanHolder), method, e);
+                throw new RuntimeBeanExpressionException(exchange, getBeanName(exchange, beanName, beanHolder), method, e);
             }
         }
     }
@@ -262,10 +262,10 @@ public class BeanExpression implements Expression, Predicate, AfterPropertiesCon
         return holder;
     }
 
-    private static String getBeanName(String beanName, BeanHolder beanHolder) {
+    private static String getBeanName(Exchange exchange, String beanName, BeanHolder beanHolder) {
         String name = beanName;
-        if (name == null && beanHolder != null && beanHolder.getBean() != null) {
-            name = beanHolder.getBean().getClass().getCanonicalName();
+        if (name == null && beanHolder != null && beanHolder.getBean(exchange) != null) {
+            name = beanHolder.getBean(exchange).getClass().getCanonicalName();
         }
         if (name == null && beanHolder != null && beanHolder.getBeanInfo() != null && beanHolder.getBeanInfo().getType() != null) {
             name = beanHolder.getBeanInfo().getType().getCanonicalName();
@@ -326,7 +326,7 @@ public class BeanExpression implements Expression, Predicate, AfterPropertiesCon
     private static Object invokeOgnlMethod(BeanHolder beanHolder, String beanName, String ognl, Exchange exchange) {
 
         // we must start with having bean as the result
-        Object result = beanHolder.getBean();
+        Object result = beanHolder.getBean(exchange);
 
         // copy the original exchange to avoid side effects on it
         Exchange resultExchange = ExchangeHelper.createCopy(exchange, true);
@@ -342,7 +342,7 @@ public class BeanExpression implements Expression, Predicate, AfterPropertiesCon
         String ognlPath = "";
 
         // loop and invoke each method
-        Object beanToCall = beanHolder.getBean();
+        Object beanToCall = beanHolder.getBean(exchange);
         Class<?> beanType = beanHolder.getBeanInfo().getType();
 
         // there must be a bean to call with, we currently does not support OGNL expressions on using purely static methods
@@ -373,7 +373,7 @@ public class BeanExpression implements Expression, Predicate, AfterPropertiesCon
             boolean nullSafe = OgnlHelper.isNullSafeOperator(methodName);
 
             if (holder == null) {
-                String name = getBeanName(null, beanHolder);
+                String name = getBeanName(exchange, null, beanHolder);
                 throw new RuntimeBeanExpressionException(exchange, name, ognl, "last method returned null and therefore cannot continue to invoke method " + methodName + " on a null instance");
             }
 
@@ -411,7 +411,7 @@ public class BeanExpression implements Expression, Predicate, AfterPropertiesCon
                     key = lan.createExpression(key).evaluate(exchange, String.class);
                 }
                 if (key != null) {
-                    result = lookupResult(resultExchange, key, result, nullSafe, ognlPath, holder.getBean());
+                    result = lookupResult(resultExchange, key, result, nullSafe, ognlPath, holder.getBean(exchange));
                 }
             }
 
diff --git a/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java b/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java
index 18b3f18..a230806 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java
@@ -122,16 +122,6 @@ public class BeanLanguage extends LanguageSupport {
         return new BeanExpression(beanName, method);
     }
 
-    public Expression createExpression(Object bean, String method) {
-        org.apache.camel.util.ObjectHelper.notNull(bean, "bean");
-        if (bean instanceof String) {
-            String beanName = (String) bean;
-            return new BeanExpression(beanName, method);
-        } else {
-            return new BeanExpression(bean, method);
-        }
-    }
-
     @Override
     public boolean isSingleton() {
         return false;
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java
index 8757dad..b37a601 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java
@@ -33,6 +33,9 @@ public class RestOpenApiReaderEnableVendorExtensionTest extends CamelTestSupport
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
+    @BindToRegistry("userService")
+    private Object dummy = new Object();
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java
index 66c7147..9336964 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java
@@ -28,14 +28,14 @@ import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 
-
-
-
 public class RestOpenApiReaderModelApiSecurityTest extends CamelTestSupport {
 
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
+    @BindToRegistry("userService")
+    private Object dummy = new Object();
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java
index 91df38e..7685c7d 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java
@@ -28,12 +28,14 @@ import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 
-
 public class RestOpenApiReaderModelBookOrderTest extends CamelTestSupport {
 
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
+    @BindToRegistry("bookService")
+    private Object dummy = new Object();
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
index 39459d8..df611f8 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
@@ -34,6 +34,9 @@ public class RestOpenApiReaderModelTest extends CamelTestSupport {
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
+    @BindToRegistry("userService")
+    private Object dummy = new Object();
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java
index 9efdbea..a7905ff 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java
@@ -36,7 +36,6 @@ public class SpringRestOpenApiReaderModelApiSecurityTest extends CamelSpringTest
 
     @Test
     public void testReaderRead() throws Exception {
-        
         BeanConfig config = new BeanConfig();
         config.setHost("localhost:8080");
         config.setSchemes(new String[]{"http"});
@@ -75,13 +74,12 @@ public class SpringRestOpenApiReaderModelApiSecurityTest extends CamelSpringTest
         assertTrue(json.contains("\"type\" : \"string\""));
         assertTrue(json.contains("\"format\" : \"date\""));
         assertFalse(json.contains("\"enum\""));
+
         context.stop();
-        
     }
     
     @Test
     public void testReaderReadV3() throws Exception {
-        
         BeanConfig config = new BeanConfig();
         config.setHost("localhost:8080");
         config.setSchemes(new String[]{"http"});
@@ -120,7 +118,7 @@ public class SpringRestOpenApiReaderModelApiSecurityTest extends CamelSpringTest
         assertTrue(json.contains("\"type\" : \"string\""));
         assertTrue(json.contains("\"format\" : \"date\""));
         assertFalse(json.contains("\"enum\""));
+
         context.stop();
-        
     }
 }
diff --git a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.xml b/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.xml
index b39d317..cc5c91a 100644
--- a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.xml
+++ b/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.xml
@@ -27,6 +27,8 @@
   <!-- use a dummy rest consumer factory for the rest engine -->
   <bean id="dummy-rest" class="org.apache.camel.openapi.DummyRestConsumerFactory"/>
 
+  <bean id="userService" class="java.lang.Object"/>
+
   <camelContext xmlns="http://camel.apache.org/schema/spring">
 
     <rest path="/user" tag="dude" consumes="application/json" produces="application/json">
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/config/errorHandler.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/config/errorHandler.xml
index 6fef7a0..17d9b80 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/spring/config/errorHandler.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/spring/config/errorHandler.xml
@@ -38,7 +38,7 @@
     </camelContext>
 
     <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
-        <property name="deadLetterUri" value="bean:exceptionProcessor"/>
+        <property name="deadLetterUri" value="mock:exceptionProcessor"/>
         <property name="redeliveryPolicy" ref="rsRedeliveryPolicyConfig"/>
     </bean>
 
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderEnableVendorExtensionTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderEnableVendorExtensionTest.java
index da42e83..a3a596e 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderEnableVendorExtensionTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderEnableVendorExtensionTest.java
@@ -41,6 +41,9 @@ public class RestSwaggerReaderEnableVendorExtensionTest extends CamelTestSupport
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
+    @BindToRegistry("userService")
+    private Object dummy = new Object();
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelApiSecurityTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelApiSecurityTest.java
index 61a3237..2ddfdf2 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelApiSecurityTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelApiSecurityTest.java
@@ -41,6 +41,9 @@ public class RestSwaggerReaderModelApiSecurityTest extends CamelTestSupport {
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
+    @BindToRegistry("userService")
+    private Object dummy = new Object();
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelBookOrderTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelBookOrderTest.java
index efe4467..0831552 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelBookOrderTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelBookOrderTest.java
@@ -40,6 +40,9 @@ public class RestSwaggerReaderModelBookOrderTest extends CamelTestSupport {
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
+    @BindToRegistry("bookService")
+    private Object dummy = new Object();
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelTest.java
index 32e52e6..c3805a9 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelTest.java
@@ -41,6 +41,9 @@ public class RestSwaggerReaderModelTest extends CamelTestSupport {
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
+    @BindToRegistry("userService")
+    private Object dummy = new Object();
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-swagger-java/src/test/resources/org/apache/camel/swagger/SpringRestSwaggerReaderModelApiSecurityTest.xml b/components/camel-swagger-java/src/test/resources/org/apache/camel/swagger/SpringRestSwaggerReaderModelApiSecurityTest.xml
index 9fc8609..ae5c087 100644
--- a/components/camel-swagger-java/src/test/resources/org/apache/camel/swagger/SpringRestSwaggerReaderModelApiSecurityTest.xml
+++ b/components/camel-swagger-java/src/test/resources/org/apache/camel/swagger/SpringRestSwaggerReaderModelApiSecurityTest.xml
@@ -27,6 +27,9 @@
   <!-- use a dummy rest consumer factory for the rest engine -->
   <bean id="dummy-rest" class="org.apache.camel.swagger.DummyRestConsumerFactory"/>
 
+  <!-- dummy -->
+  <bean id="userService" class="java.lang.Object"/>
+
   <camelContext xmlns="http://camel.apache.org/schema/spring">
 
     <rest path="/user" tag="dude" consumes="application/json" produces="application/json">
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java b/core/camel-api/src/main/java/org/apache/camel/BeanScope.java
similarity index 56%
copy from components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
copy to core/camel-api/src/main/java/org/apache/camel/BeanScope.java
index 508d61a..b16808a 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/beanclass/ClassEndpoint.java
+++ b/core/camel-api/src/main/java/org/apache/camel/BeanScope.java
@@ -14,20 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.beanclass;
+package org.apache.camel;
 
-import org.apache.camel.Component;
-import org.apache.camel.component.bean.BeanEndpoint;
-import org.apache.camel.spi.UriEndpoint;
+import javax.xml.bind.annotation.XmlEnum;
 
-/**
- * The <a href="http://camel.apache.org/class.html">class component</a> is for invoking Java classes (Java beans) from Camel.
- */
-@UriEndpoint(firstVersion = "2.4.0", scheme = "class", title = "Class", syntax = "class:beanName", producerOnly = true, label = "core,java")
-public class ClassEndpoint extends BeanEndpoint {
+@XmlEnum
+public enum BeanScope {
 
-    public ClassEndpoint(String endpointUri, Component component) {
-        super(endpointUri, component);
-    }
+    Singleton, Request, Prototype;
 
 }
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/BeanProcessorFactory.java b/core/camel-api/src/main/java/org/apache/camel/spi/BeanProcessorFactory.java
index aa6e7f0..256d1ae 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/BeanProcessorFactory.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/BeanProcessorFactory.java
@@ -18,6 +18,7 @@ package org.apache.camel.spi;
 
 import java.lang.reflect.Method;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Processor;
 
@@ -50,10 +51,10 @@ public interface BeanProcessorFactory {
      * @param beanClass     or the bean class
      * @param ref           or bean reference to lookup the bean from the registry
      * @param method        optional name of method to invoke
-     * @param cacheBean    whether to cache lookup up the bean
+     * @param scope         the scope of the bean
      * @return the created processor
      * @throws Exception is thrown if error creating the processor
      */
     Processor createBeanProcessor(CamelContext camelContext, Object bean, String beanType, Class<?> beanClass, String ref,
-                                         String method, boolean cacheBean) throws Exception;
+                                         String method, BeanScope scope) throws Exception;
 }
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java b/core/camel-base/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
index 48a0ff9..37fa497 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
@@ -17,7 +17,6 @@
 package org.apache.camel.impl.converter;
 
 import java.io.BufferedReader;
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.net.URL;
diff --git a/core/camel-core-engine/src/main/docs/eips/bean-eip.adoc b/core/camel-core-engine/src/main/docs/eips/bean-eip.adoc
index 77f733e..9b997493 100644
--- a/core/camel-core-engine/src/main/docs/eips/bean-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/eips/bean-eip.adoc
@@ -16,7 +16,7 @@ the xref:registry.adoc[Registry]
 == EIP options
 
 // eip options: START
-The Bean EIP supports 4 options which are listed below:
+The Bean EIP supports 5 options which are listed below:
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
@@ -24,10 +24,22 @@ The Bean EIP supports 4 options which are listed below:
 | *ref* | Sets a reference to a bean to use |  | String
 | *method* | Sets the method name on the bean to use |  | String
 | *beanType* | Sets the Class of the bean |  | String
-| *cache* | Caches the bean lookup, to avoid lookup up bean on every usage. | true | Boolean
+| *cache* | *Deprecated* Use scope option instead. |  | Boolean
+| *scope* | Scope of bean. See below for more details. | Singleton | String |
 |===
 // eip options: END
 
+=== Bean scope
+
+When using `singleton` scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint.
+The bean should be thread-safe in case concurrent threads is calling the bean at the same time.
+When using `request` scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean
+while processing a request and you want to call the same bean instance multiple times while processing the request.
+The bean does not have to be thread-safe as the instance is only called from the same request.
+When using `prototype` scope, then the bean will be looked up or created per call. However in case of lookup then this is delegated
+to the bean registry such as Spring or CDI (if in use), which depends on their configuration can act as either singleton or prototype scope.
+so when using `prototype` then this depends on the delegated registry.
+
 == Bean as endpoint
 
 Camel also supports invoking xref:components::bean-component.adoc[Bean] as an Endpoint. In the
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/model/BeanDefinition.java b/core/camel-core-engine/src/main/java/org/apache/camel/model/BeanDefinition.java
index 701497c..c18eb18 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/model/BeanDefinition.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/model/BeanDefinition.java
@@ -22,6 +22,7 @@ import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.util.ObjectHelper;
 
@@ -40,7 +41,11 @@ public class BeanDefinition extends NoOutputDefinition<BeanDefinition> {
     private String beanType;
     @XmlAttribute
     @Metadata(defaultValue = "true", javaType = "java.lang.Boolean")
+    @Deprecated
     private String cache;
+    @XmlAttribute
+    @Metadata(defaultValue = "Singleton", enums = "Singleton,Request,Prototype")
+    private String scope;
     @XmlTransient
     private Class<?> beanClass;
     @XmlTransient
@@ -147,17 +152,46 @@ public class BeanDefinition extends NoOutputDefinition<BeanDefinition> {
     }
 
     public String getCache() {
-        return cache;
+        if (scope == null || BeanScope.Singleton.name().equals(scope)) {
+            return "true";
+        } else {
+            return "false";
+        }
     }
 
     /**
-     * Caches the bean lookup, to avoid lookup up bean on every usage.
+     * Use singleton option instead
      */
     public void setCache(String cache) {
-        this.cache = cache;
+        if ("true".equals(cache)) {
+            scope = BeanScope.Singleton.name();
+        } else {
+            scope = BeanScope.Prototype.name();
+        }
+    }
+
+    public String getScope() {
+        return scope;
+    }
+
+    public void setScope(String scope) {
+        this.scope = scope;
     }
 
-    // Fluent API
-    // -------------------------------------------------------------------------
+    /**
+     * Scope of bean.
+     *
+     * When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint.
+     * The bean should be thread-safe in case concurrent threads is calling the bean at the same time.
+     * When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean
+     * while processing a request and you want to call the same bean instance multiple times while processing the request.
+     * The bean does not have to be thread-safe as the instance is only called from the same request.
+     * When using delegate scope, then the bean will be looked up or created per call. However in case of lookup then this is delegated
+     * to the bean registry such as Spring or CDI (if in use), which depends on their configuration can act as either singleton or prototype scope.
+     * so when using delegate then this depends on the delegated registry.
+     */
+    public void setScope(BeanScope scope) {
+        this.scope = scope.name();
+    }
 
 }
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/model/LogDefinition.java b/core/camel-core-engine/src/main/java/org/apache/camel/model/LogDefinition.java
index ad4c344..7a0e8cc 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/model/LogDefinition.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/model/LogDefinition.java
@@ -36,7 +36,7 @@ public class LogDefinition extends NoOutputDefinition<LogDefinition> {
     @XmlAttribute(required = true)
     private String message;
     @XmlAttribute
-    @Metadata(defaultValue = "INFO")
+    @Metadata(defaultValue = "INFO", enums = "TRACE,DEBUG,INFO,WARN,ERROR,OFF")
     private String loggingLevel;
     @XmlAttribute
     private String logName;
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/model/ProcessorDefinition.java b/core/camel-core-engine/src/main/java/org/apache/camel/model/ProcessorDefinition.java
index 5535384..75cc9fa 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/model/ProcessorDefinition.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/model/ProcessorDefinition.java
@@ -37,6 +37,7 @@ import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.namespace.QName;
 
 import org.apache.camel.AggregationStrategy;
+import org.apache.camel.BeanScope;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
@@ -2476,10 +2477,8 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
      * Translator EIP:</a> Adds a bean which is invoked which could be a final
      * destination, or could be a transformation in a pipeline
      *
-     * @param bean the bean to invoke, or a reference to a bean if the type is a
-     *            String
-     * @param method the method name to invoke on the bean (can be used to avoid
-     *            ambiguity)
+     * @param bean the bean to invoke, or a reference to a bean if the type is a String
+     * @param method the method name to invoke on the bean (can be used to avoid ambiguity)
      * @return the builder
      */
     public Type bean(Object bean, String method) {
@@ -2499,10 +2498,8 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
      * Translator EIP:</a> Adds a bean which is invoked which could be a final
      * destination, or could be a transformation in a pipeline
      *
-     * @param bean the bean to invoke, or a reference to a bean if the type is a
-     *            String
-     * @param method the method name to invoke on the bean (can be used to avoid
-     *            ambiguity)
+     * @param bean the bean to invoke, or a reference to a bean if the type is a String
+     * @param method the method name to invoke on the bean (can be used to avoid ambiguity)
      * @return the builder
      */
     public Type bean(Supplier<Object> bean, String method) {
@@ -2514,21 +2511,32 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
      * Translator EIP:</a> Adds a bean which is invoked which could be a final
      * destination, or could be a transformation in a pipeline
      *
-     * @param bean the bean to invoke, or a reference to a bean if the type is a
-     *            String
-     * @param cache if enabled, Camel will cache the result of the first
-     *            Registry look-up. Cache can be enabled if the bean in the
-     *            Registry is defined as a singleton scope. the multi parameter
+     * @param bean the bean to invoke, or a reference to a bean if the type is a String
+     * @param method the method name to invoke on the bean (can be used to avoid ambiguity)
+     * @param scope bean scope to use (singleton, request, prototype)
+     * @return the builder
+     */
+    public Type bean(Supplier<Object> bean, String method, BeanScope scope) {
+        return bean(bean.get(), method, scope);
+    }
+
+    /**
+     * <a href="http://camel.apache.org/message-translator.html">Message
+     * Translator EIP:</a> Adds a bean which is invoked which could be a final
+     * destination, or could be a transformation in a pipeline
+     *
+     * @param bean the bean to invoke, or a reference to a bean if the type is a String
+     * @param scope bean scope to use (singleton, request, prototype)
      * @return the builder
      */
-    public Type bean(Object bean, boolean cache) {
+    public Type bean(Object bean, BeanScope scope) {
         BeanDefinition answer = new BeanDefinition();
         if (bean instanceof String) {
             answer.setRef((String)bean);
         } else {
             answer.setBean(bean);
         }
-        answer.setCache(Boolean.toString(cache));
+        answer.setScope(scope);
         addOutput(answer);
         return asType();
     }
@@ -2538,16 +2546,12 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
      * Translator EIP:</a> Adds a bean which is invoked which could be a final
      * destination, or could be a transformation in a pipeline
      *
-     * @param bean the bean to invoke, or a reference to a bean if the type is a
-     *            String
-     * @param method the method name to invoke on the bean (can be used to avoid
-     *            ambiguity)
-     * @param cache if enabled, Camel will cache the result of the first
-     *            Registry look-up. Cache can be enabled if the bean in the
-     *            Registry is defined as a singleton scope. the multi parameter
+     * @param bean the bean to invoke, or a reference to a bean if the type is a String
+     * @param method the method name to invoke on the bean (can be used to avoid ambiguity)
+     * @param scope bean scope to use (singleton, request, prototype)
      * @return the builder
      */
-    public Type bean(Object bean, String method, boolean cache) {
+    public Type bean(Object bean, String method, BeanScope scope) {
         BeanDefinition answer = new BeanDefinition();
         if (bean instanceof String) {
             answer.setRef((String)bean);
@@ -2555,7 +2559,7 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
             answer.setBean(bean);
         }
         answer.setMethod(method);
-        answer.setCache(Boolean.toString(cache));
+        answer.setScope(scope);
         addOutput(answer);
         return asType();
     }
@@ -2565,8 +2569,7 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
      * Translator EIP:</a> Adds a bean which is invoked which could be a final
      * destination, or could be a transformation in a pipeline
      *
-     * @param beanType the bean class, Camel will instantiate an object at
-     *            runtime
+     * @param beanType the bean class, Camel will instantiate an object at runtime
      * @return the builder
      */
     public Type bean(Class<?> beanType) {
@@ -2581,10 +2584,25 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
      * Translator EIP:</a> Adds a bean which is invoked which could be a final
      * destination, or could be a transformation in a pipeline
      *
-     * @param beanType the bean class, Camel will instantiate an object at
-     *            runtime
-     * @param method the method name to invoke on the bean (can be used to avoid
-     *            ambiguity)
+     * @param beanType the bean class, Camel will instantiate an object at runtime
+     * @param scope bean scope to use (singleton, request, prototype)
+     * @return the builder
+     */
+    public Type bean(Class<?> beanType, BeanScope scope) {
+        BeanDefinition answer = new BeanDefinition();
+        answer.setBeanType(beanType);
+        answer.setScope(scope);
+        addOutput(answer);
+        return asType();
+    }
+
+    /**
+     * <a href="http://camel.apache.org/message-translator.html">Message
+     * Translator EIP:</a> Adds a bean which is invoked which could be a final
+     * destination, or could be a transformation in a pipeline
+     *
+     * @param beanType the bean class, Camel will instantiate an object at runtime
+     * @param method the method name to invoke on the bean (can be used to avoid ambiguity)
      * @return the builder
      */
     public Type bean(Class<?> beanType, String method) {
@@ -2600,20 +2618,16 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
      * Translator EIP:</a> Adds a bean which is invoked which could be a final
      * destination, or could be a transformation in a pipeline
      *
-     * @param beanType the bean class, Camel will instantiate an object at
-     *            runtime
-     * @param method the method name to invoke on the bean (can be used to avoid
-     *            ambiguity)
-     * @param cache if enabled, Camel will cache the result of the first
-     *            Registry look-up. Cache can be enabled if the bean in the
-     *            Registry is defined as a singleton scope. the multi parameter
+     * @param beanType the bean class, Camel will instantiate an object at runtime
+     * @param method the method name to invoke on the bean (can be used to avoid ambiguity)
+     * @param scope bean scope to use (singleton, request, prototype)
      * @return the builder
      */
-    public Type bean(Class<?> beanType, String method, boolean cache) {
+    public Type bean(Class<?> beanType, String method, BeanScope scope) {
         BeanDefinition answer = new BeanDefinition();
         answer.setBeanType(beanType);
         answer.setMethod(method);
-        answer.setCache(Boolean.toString(cache));
+        answer.setScope(scope);
         addOutput(answer);
         return asType();
     }
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/reifier/BeanReifier.java b/core/camel-core-engine/src/main/java/org/apache/camel/reifier/BeanReifier.java
index e7db558..8a21e51 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/reifier/BeanReifier.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/reifier/BeanReifier.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.reifier;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.Processor;
@@ -23,6 +24,7 @@ import org.apache.camel.model.BeanDefinition;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.spi.BeanProcessorFactory;
 import org.apache.camel.spi.RouteContext;
+import org.apache.camel.support.CamelContextHelper;
 
 public class BeanReifier extends ProcessorReifier<BeanDefinition> {
 
@@ -44,11 +46,12 @@ public class BeanReifier extends ProcessorReifier<BeanDefinition> {
         if (fac == null) {
             throw new IllegalStateException("Cannot find BeanProcessorFactory. Make sure camel-bean is on the classpath.");
         }
-        return fac.createBeanProcessor(camelContext, bean, beanType, beanClass, ref, method, isCacheBean());
-    }
-
-    private boolean isCacheBean() {
-        return definition.getCache() == null || Boolean.parseBoolean(definition.getCache());
+        // use singleton as default scope
+        BeanScope scope = BeanScope.Singleton;
+        if (definition.getScope() != null) {
+            scope = CamelContextHelper.parse(routeContext.getCamelContext(), BeanScope.class, definition.getScope());
+        }
+        return fac.createBeanProcessor(camelContext, bean, beanType, beanClass, ref, method, scope);
     }
 
 }
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/reifier/ProcessorReifier.java b/core/camel-core-engine/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
index d831188..a2b7cd3 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
@@ -27,7 +27,6 @@ import org.apache.camel.Channel;
 import org.apache.camel.ErrorHandlerFactory;
 import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.Processor;
-import org.apache.camel.RouteAware;
 import org.apache.camel.model.AggregateDefinition;
 import org.apache.camel.model.BeanDefinition;
 import org.apache.camel.model.CatchDefinition;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanEndpointTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanEndpointTest.java
index bb4c44e..06750b7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanEndpointTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanEndpointTest.java
@@ -44,7 +44,7 @@ public class BeanEndpointTest extends ContextTestSupport {
         endpoint.setBeanName("foo");
         assertEquals("foo", endpoint.getBeanName());
 
-        assertEquals(false, endpoint.isCache());
+        assertEquals(true, endpoint.isSingleton());
         assertNull(endpoint.getBeanHolder());
         assertNull(endpoint.getMethod());
         assertEquals("bean:foo", endpoint.getEndpointUri());
@@ -70,7 +70,7 @@ public class BeanEndpointTest extends ContextTestSupport {
         endpoint.setBeanName("foo");
         assertEquals("foo", endpoint.getBeanName());
 
-        assertEquals(false, endpoint.isCache());
+        assertEquals(true, endpoint.isSingleton());
         assertNull(endpoint.getBeanHolder());
         assertNull(endpoint.getMethod());
         assertEquals("bean:foo", endpoint.getEndpointUri());
@@ -98,7 +98,7 @@ public class BeanEndpointTest extends ContextTestSupport {
         endpoint.setBeanName("foo");
         assertEquals("foo", endpoint.getBeanName());
 
-        assertEquals(false, endpoint.isCache());
+        assertEquals(true, endpoint.isSingleton());
         assertNull(endpoint.getBeanHolder());
         assertNull(endpoint.getMethod());
         assertEquals("bean:foo", endpoint.getEndpointUri());
@@ -124,7 +124,7 @@ public class BeanEndpointTest extends ContextTestSupport {
         endpoint.setMethod("hello");
         assertEquals("foo", endpoint.getBeanName());
 
-        assertEquals(false, endpoint.isCache());
+        assertEquals(true, endpoint.isSingleton());
         assertNull(endpoint.getBeanHolder());
         assertEquals("hello", endpoint.getMethod());
         assertEquals("bean:foo?method=hello", endpoint.getEndpointUri());
@@ -151,7 +151,7 @@ public class BeanEndpointTest extends ContextTestSupport {
         endpoint.setMethod("hello");
         assertEquals("foo", endpoint.getBeanName());
 
-        assertEquals(true, endpoint.isCache());
+        assertEquals(true, endpoint.isSingleton());
         assertNull(endpoint.getBeanHolder());
         assertEquals("hello", endpoint.getMethod());
         assertEquals("bean:foo?method=hello", endpoint.getEndpointUri());
@@ -179,7 +179,7 @@ public class BeanEndpointTest extends ContextTestSupport {
         BeanHolder holder = new RegistryBean(context, "foo");
         endpoint.setBeanHolder(holder);
 
-        assertEquals(false, endpoint.isCache());
+        assertEquals(true, endpoint.isSingleton());
         assertEquals(holder, endpoint.getBeanHolder());
 
         context.addRoutes(new RouteBuilder() {
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodAmbiguousTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodAmbiguousTest.java
index 9b387ce..30f0474 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodAmbiguousTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodAmbiguousTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.bean;
 
 import java.io.ByteArrayInputStream;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.JndiRegistry;
@@ -66,11 +67,11 @@ public class BeanExplicitMethodAmbiguousTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:hello").bean("dummy", "hello", true);
+                from("direct:hello").bean("dummy", "hello", BeanScope.Singleton);
 
-                from("direct:bye").bean("dummy", true);
+                from("direct:bye").bean("dummy", BeanScope.Singleton);
 
-                from("direct:foo").bean("dummy", "bar", true);
+                from("direct:foo").bean("dummy", "bar", BeanScope.Singleton);
             }
         };
     }
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanLifecycleTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanLifecycleTest.java
index f7674cb..6f77e3b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanLifecycleTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanLifecycleTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.bean;
 
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.Service;
@@ -83,9 +84,9 @@ public class BeanLifecycleTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:foo").routeId("foo").bean(statefulInstance, "doSomething").bean(MyStatefulBean.class, "doSomething")
-                    .bean(MyStatefulBean.class.getName(), "doSomething", true).bean(MyStatelessBean.class.getName(), "doSomething", false)
-                    .to("bean:statefulInstanceInRegistry?method=doSomething&cache=true").to("bean:statefulInstanceInRegistryNoCache?method=doSomething&cache=false")
+                from("direct:foo").routeId("foo").bean(statefulInstance, "doSomething", BeanScope.Prototype).bean(MyStatefulBean.class, "doSomething")
+                    .bean(MyStatefulBean.class.getName(), "doSomething", BeanScope.Singleton).bean(MyStatelessBean.class.getName(), "doSomething", BeanScope.Prototype)
+                    .to("bean:statefulInstanceInRegistry?method=doSomething&scope=Singleton").to("bean:statefulInstanceInRegistryNoCache?method=doSomething&scope=Prototype")
                     .to("mock:result");
             }
         };
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanNoCacheTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanNoCacheTest.java
index 752a5e6..824ff70 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanNoCacheTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanNoCacheTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.bean;
 
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.Test;
@@ -42,7 +43,7 @@ public class BeanNoCacheTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start").bean(MyCoolBean.class, "doSomething", false).to("mock:result");
+                from("direct:start").bean(MyCoolBean.class, "doSomething", BeanScope.Prototype).to("mock:result");
             }
         };
     }
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefNoCacheTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefNoCacheTest.java
index 8a28189..9914b8f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefNoCacheTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefNoCacheTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.bean;
 
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.Test;
@@ -42,7 +43,7 @@ public class BeanRefNoCacheTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start").bean(MyCoolBean.class.getName(), "doSomething", false).to("mock:result");
+                from("direct:start").bean(MyCoolBean.class.getName(), "doSomething", BeanScope.Prototype).to("mock:result");
             }
         };
     }
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRegistryBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRegistryBeanTest.java
index 8a0470d..08abffc 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRegistryBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRegistryBeanTest.java
@@ -36,7 +36,7 @@ public class BeanRegistryBeanTest extends ContextTestSupport {
     public void testNoBean() {
         RegistryBean rb = new RegistryBean(context, "bar");
         try {
-            rb.getBean();
+            rb.getBean(null);
             fail("Should have thrown exception");
         } catch (NoSuchBeanException e) {
             assertEquals("bar", e.getName());
@@ -46,7 +46,7 @@ public class BeanRegistryBeanTest extends ContextTestSupport {
     @Test
     public void testBean() {
         RegistryBean rb = new RegistryBean(context, "foo");
-        Object bean = rb.getBean();
+        Object bean = rb.getBean(null);
         assertIsInstanceOf(MyFooBean.class, bean);
 
         assertNotNull(rb.getContext());
@@ -65,7 +65,7 @@ public class BeanRegistryBeanTest extends ContextTestSupport {
         };
         rb.setParameterMappingStrategy(myStrategy);
 
-        Object bean = rb.getBean();
+        Object bean = rb.getBean(null);
         assertIsInstanceOf(MyFooBean.class, bean);
 
         assertNotNull(rb.getContext());
@@ -78,7 +78,7 @@ public class BeanRegistryBeanTest extends ContextTestSupport {
     public void testLookupClass() throws Exception {
         RegistryBean rb = new RegistryBean(context, "static");
 
-        Object bean = rb.getBean();
+        Object bean = rb.getBean(null);
         MyFooBean foo = assertIsInstanceOf(MyFooBean.class, bean);
         assertEquals("foofoo", foo.echo("foo"));
     }
@@ -87,7 +87,7 @@ public class BeanRegistryBeanTest extends ContextTestSupport {
     public void testLookupFQNClass() throws Exception {
         RegistryBean rb = new RegistryBean(context, "org.apache.camel.component.bean.MyDummyBean");
 
-        Object bean = rb.getBean();
+        Object bean = rb.getBean(null);
         MyDummyBean dummy = assertIsInstanceOf(MyDummyBean.class, bean);
         assertEquals("Hello World", dummy.hello("World"));
     }
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MyRequestBean.java
similarity index 60%
copy from components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java
copy to core/camel-core/src/test/java/org/apache/camel/component/bean/MyRequestBean.java
index 55b7f12..da09ce6 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MyRequestBean.java
@@ -16,21 +16,15 @@
  */
 package org.apache.camel.component.bean;
 
-import org.apache.camel.CamelContext;
+public class MyRequestBean {
 
-/**
- * A constant {@link org.apache.camel.component.bean.BeanHolder} for a class or static class
- * where the intention is to only invoke static methods, without the need for creating an instance of the type.
- */
-public class ConstantStaticTypeBeanHolder extends ConstantTypeBeanHolder {
+    private int counter;
 
-    public ConstantStaticTypeBeanHolder(Class<?> type, CamelContext context) {
-        super(type, context);
+    public MyRequestBean() {
     }
 
-    @Override
-    public Object getBean() {
-        // we cannot create a bean as there is no default constructor
-        return null;
+    public String doSomething(String body) {
+        counter++;
+        return body + counter;
     }
 }
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java
index 988a83a..8ce6598 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.bean;
 
 import javax.naming.Context;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.Body;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.ExchangePattern;
@@ -60,7 +61,7 @@ public class NewInstanceTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
-                from("direct:start").bean("myBean", false).to("mock:result");
+                from("direct:start").bean("myBean", BeanScope.Prototype).to("mock:result");
             }
         };
     }
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanNoCacheTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/RequestScopedBeanComponentTest.java
similarity index 60%
copy from core/camel-core/src/test/java/org/apache/camel/component/bean/BeanNoCacheTest.java
copy to core/camel-core/src/test/java/org/apache/camel/component/bean/RequestScopedBeanComponentTest.java
index 752a5e6..b9c2446 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanNoCacheTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/RequestScopedBeanComponentTest.java
@@ -16,23 +16,21 @@
  */
 package org.apache.camel.component.bean;
 
-import java.util.concurrent.atomic.AtomicInteger;
-
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.Test;
 
-public class BeanNoCacheTest extends ContextTestSupport {
-
-    private static final AtomicInteger COUNTER = new AtomicInteger();
+public class RequestScopedBeanComponentTest extends ContextTestSupport {
 
     @Test
-    public void testBeanRefNoCache() throws Exception {
-        getMockEndpoint("mock:result").expectedBodiesReceived("Hello1", "Bye2", "Camel3");
+    public void testRequestScope() throws Exception {
+        // creates a new instance so the counter starts from 1
+        getMockEndpoint("mock:a").expectedBodiesReceived("Hello1", "World1");
+        // and on the 2nd call its the same instance (request) so counter is now 2
+        getMockEndpoint("mock:b").expectedBodiesReceived("Hello12", "World12");
 
         template.sendBody("direct:start", "Hello");
-        template.sendBody("direct:start", "Bye");
-        template.sendBody("direct:start", "Camel");
+        template.sendBody("direct:start", "World");
 
         assertMockEndpointsSatisfied();
     }
@@ -42,25 +40,12 @@ public class BeanNoCacheTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start").bean(MyCoolBean.class, "doSomething", false).to("mock:result");
+                from("direct:start")
+                    .to("bean:org.apache.camel.component.bean.MyRequestBean?scope=Request")
+                    .to("mock:a")
+                    .to("bean:org.apache.camel.component.bean.MyRequestBean?scope=Request")
+                    .to("mock:b");
             }
         };
     }
-
-    public static class MyCoolBean {
-
-        private final int count;
-
-        public MyCoolBean() {
-            count = COUNTER.incrementAndGet();
-        }
-
-        public int getCount() {
-            return count;
-        }
-
-        public String doSomething(String s) {
-            return s + count;
-        }
-    }
 }
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/RequestScopedBeanEIPTest.java
similarity index 59%
copy from components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java
copy to core/camel-core/src/test/java/org/apache/camel/component/bean/RequestScopedBeanEIPTest.java
index 55b7f12..ceb16d9 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/RequestScopedBeanEIPTest.java
@@ -16,21 +16,22 @@
  */
 package org.apache.camel.component.bean;
 
-import org.apache.camel.CamelContext;
+import org.apache.camel.BeanScope;
+import org.apache.camel.builder.RouteBuilder;
 
-/**
- * A constant {@link org.apache.camel.component.bean.BeanHolder} for a class or static class
- * where the intention is to only invoke static methods, without the need for creating an instance of the type.
- */
-public class ConstantStaticTypeBeanHolder extends ConstantTypeBeanHolder {
-
-    public ConstantStaticTypeBeanHolder(Class<?> type, CamelContext context) {
-        super(type, context);
-    }
+public class RequestScopedBeanEIPTest extends RequestScopedBeanComponentTest {
 
     @Override
-    public Object getBean() {
-        // we cannot create a bean as there is no default constructor
-        return null;
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start")
+                    .bean(MyRequestBean.class, BeanScope.Request)
+                    .to("mock:a")
+                    .bean(MyRequestBean.class, BeanScope.Request)
+                    .to("mock:b");
+            }
+        };
     }
 }
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanThisAdviceWithIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanThisAdviceWithIssueTest.java
index 1309f71..f752a01 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanThisAdviceWithIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanThisAdviceWithIssueTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.bean.issues;
 
+import org.apache.camel.BeanScope;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.AdviceWithRouteBuilder;
@@ -38,7 +39,7 @@ public class BeanThisAdviceWithIssueTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:mytest").id(ROUTE_ID).bean(this, "hello", false).to("log:out");
+                from("direct:mytest").id(ROUTE_ID).bean(this, "hello", BeanScope.Prototype).to("log:out");
             }
 
             public void hello(final Exchange exchange) {
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
index 69ef1e6..9f1e053 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
@@ -25,6 +25,7 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.JndiRegistry;
 import org.junit.Test;
 
+@Deprecated
 public class BeanCachedTest extends ContextTestSupport {
 
     private Context context;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanSingletonTest.java
similarity index 92%
copy from core/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
copy to core/camel-core/src/test/java/org/apache/camel/processor/BeanSingletonTest.java
index 69ef1e6..730b2af 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanSingletonTest.java
@@ -25,7 +25,7 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.JndiRegistry;
 import org.junit.Test;
 
-public class BeanCachedTest extends ContextTestSupport {
+public class BeanSingletonTest extends ContextTestSupport {
 
     private Context context;
 
@@ -36,9 +36,8 @@ public class BeanCachedTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() {
-                from("direct:noCache").to("bean:something?cache=false");
-                from("direct:cached").to("bean:something?cache=true");
-
+                from("direct:noCache").to("bean:something?scope=Prototype");
+                from("direct:cached").to("bean:something?scope=Singleton");
             }
         };
     }
@@ -65,7 +64,7 @@ public class BeanCachedTest extends ContextTestSupport {
     }
 
     @Test
-    public void testBeanWithCached() throws Exception {
+    public void testBeanWithSingleton() throws Exception {
         // Just make sure the bean processor doesn't work if the cached is false
         MyBean originalInstance = registry.lookupByNameAndType("something", MyBean.class);
         template.sendBody("direct:cached", null);
diff --git a/core/camel-core/src/test/java/org/apache/camel/runtimecatalog/impl/JSonSchemaHelperTest.java b/core/camel-core/src/test/java/org/apache/camel/runtimecatalog/impl/JSonSchemaHelperTest.java
index a9c3c44..c5ff179 100644
--- a/core/camel-core/src/test/java/org/apache/camel/runtimecatalog/impl/JSonSchemaHelperTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/runtimecatalog/impl/JSonSchemaHelperTest.java
@@ -54,14 +54,15 @@ public class JSonSchemaHelperTest extends ContextTestSupport {
         assertEquals("version", rows.get(16).keySet().iterator().next());
 
         rows = JSonSchemaHelper.parseJsonSchema("properties", json, true);
-        assertEquals(7, rows.size());
+        assertEquals(8, rows.size());
         assertEquals("beanName", rows.get(0).values().iterator().next());
         assertEquals("cache", rows.get(1).values().iterator().next());
         assertEquals("method", rows.get(2).values().iterator().next());
-        assertEquals("parameters", rows.get(3).values().iterator().next());
+        assertEquals("scope", rows.get(3).values().iterator().next());
         assertEquals("lazyStartProducer", rows.get(4).values().iterator().next());
         assertEquals("basicPropertyBinding", rows.get(5).values().iterator().next());
-        assertEquals("synchronous", rows.get(6).values().iterator().next());
+        assertEquals("parameters", rows.get(6).values().iterator().next());
+        assertEquals("synchronous", rows.get(7).values().iterator().next());
     }
 
     @Test
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/BeanEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/BeanEndpointBuilderFactory.java
index 2b2654b..b5a7712 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/BeanEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/BeanEndpointBuilderFactory.java
@@ -18,6 +18,7 @@ package org.apache.camel.builder.endpoint.dsl;
 
 import java.util.Map;
 import javax.annotation.Generated;
+import org.apache.camel.BeanScope;
 import org.apache.camel.builder.EndpointConsumerBuilder;
 import org.apache.camel.builder.EndpointProducerBuilder;
 import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
@@ -39,28 +40,26 @@ public interface BeanEndpointBuilderFactory {
             return (AdvancedBeanEndpointBuilder) this;
         }
         /**
-         * If enabled, Camel will cache the result of the first Registry
-         * look-up. Cache can be enabled if the bean in the Registry is defined
-         * as a singleton scope.
+         * Use scope option instead.
          * 
          * The option is a: <code>java.lang.Boolean</code> type.
          * 
          * Group: common
          */
+        @Deprecated
         default BeanEndpointBuilder cache(Boolean cache) {
             doSetProperty("cache", cache);
             return this;
         }
         /**
-         * If enabled, Camel will cache the result of the first Registry
-         * look-up. Cache can be enabled if the bean in the Registry is defined
-         * as a singleton scope.
+         * Use scope option instead.
          * 
          * The option will be converted to a <code>java.lang.Boolean</code>
          * type.
          * 
          * Group: common
          */
+        @Deprecated
         default BeanEndpointBuilder cache(String cache) {
             doSetProperty("cache", cache);
             return this;
@@ -77,28 +76,52 @@ public interface BeanEndpointBuilderFactory {
             return this;
         }
         /**
-         * Used for configuring additional properties on the bean.
+         * Scope of bean. When using singleton scope (default) the bean is
+         * created or looked up only once and reused for the lifetime of the
+         * endpoint. The bean should be thread-safe in case concurrent threads
+         * is calling the bean at the same time. When using request scope the
+         * bean is created or looked up once per request (exchange). This can be
+         * used if you want to store state on a bean while processing a request
+         * and you want to call the same bean instance multiple times while
+         * processing the request. The bean does not have to be thread-safe as
+         * the instance is only called from the same request. When using
+         * prototype scope, then the bean will be looked up or created per call.
+         * However in case of lookup then this is delegated to the bean registry
+         * such as Spring or CDI (if in use), which depends on their
+         * configuration can act as either singleton or prototype scope. so when
+         * using prototype then this depends on the delegated registry.
          * 
-         * The option is a: <code>java.util.Map&lt;java.lang.String,
-         * java.lang.Object&gt;</code> type.
+         * The option is a: <code>org.apache.camel.BeanScope</code> type.
          * 
          * Group: common
          */
-        default BeanEndpointBuilder parameters(Map<String, Object> parameters) {
-            doSetProperty("parameters", parameters);
+        default BeanEndpointBuilder scope(BeanScope scope) {
+            doSetProperty("scope", scope);
             return this;
         }
         /**
-         * Used for configuring additional properties on the bean.
+         * Scope of bean. When using singleton scope (default) the bean is
+         * created or looked up only once and reused for the lifetime of the
+         * endpoint. The bean should be thread-safe in case concurrent threads
+         * is calling the bean at the same time. When using request scope the
+         * bean is created or looked up once per request (exchange). This can be
+         * used if you want to store state on a bean while processing a request
+         * and you want to call the same bean instance multiple times while
+         * processing the request. The bean does not have to be thread-safe as
+         * the instance is only called from the same request. When using
+         * prototype scope, then the bean will be looked up or created per call.
+         * However in case of lookup then this is delegated to the bean registry
+         * such as Spring or CDI (if in use), which depends on their
+         * configuration can act as either singleton or prototype scope. so when
+         * using prototype then this depends on the delegated registry.
          * 
          * The option will be converted to a
-         * <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code>
-         * type.
+         * <code>org.apache.camel.BeanScope</code> type.
          * 
          * Group: common
          */
-        default BeanEndpointBuilder parameters(String parameters) {
-            doSetProperty("parameters", parameters);
+        default BeanEndpointBuilder scope(String scope) {
+            doSetProperty("scope", scope);
             return this;
         }
         /**
@@ -177,6 +200,32 @@ public interface BeanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Used for configuring additional properties on the bean.
+         * 
+         * The option is a: <code>java.util.Map&lt;java.lang.String,
+         * java.lang.Object&gt;</code> type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedBeanEndpointBuilder parameters(
+                Map<String, Object> parameters) {
+            doSetProperty("parameters", parameters);
+            return this;
+        }
+        /**
+         * Used for configuring additional properties on the bean.
+         * 
+         * The option will be converted to a
+         * <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code>
+         * type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedBeanEndpointBuilder parameters(String parameters) {
+            doSetProperty("parameters", parameters);
+            return this;
+        }
+        /**
          * Sets whether synchronous processing should be strictly used, or Camel
          * is allowed to use asynchronous processing (if supported).
          * 
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ClassEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ClassEndpointBuilderFactory.java
index d8ed2bd..2b8179c 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ClassEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ClassEndpointBuilderFactory.java
@@ -18,12 +18,13 @@ package org.apache.camel.builder.endpoint.dsl;
 
 import java.util.Map;
 import javax.annotation.Generated;
+import org.apache.camel.BeanScope;
 import org.apache.camel.builder.EndpointConsumerBuilder;
 import org.apache.camel.builder.EndpointProducerBuilder;
 import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
 
 /**
- * The class component is for invoking Java classes (Java beans) from Camel.
+ * The Class component is for invoking Java classes (Java beans) from Camel.
  * 
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
@@ -39,28 +40,26 @@ public interface ClassEndpointBuilderFactory {
             return (AdvancedClassEndpointBuilder) this;
         }
         /**
-         * If enabled, Camel will cache the result of the first Registry
-         * look-up. Cache can be enabled if the bean in the Registry is defined
-         * as a singleton scope.
+         * Use scope option instead.
          * 
          * The option is a: <code>java.lang.Boolean</code> type.
          * 
          * Group: common
          */
+        @Deprecated
         default ClassEndpointBuilder cache(Boolean cache) {
             doSetProperty("cache", cache);
             return this;
         }
         /**
-         * If enabled, Camel will cache the result of the first Registry
-         * look-up. Cache can be enabled if the bean in the Registry is defined
-         * as a singleton scope.
+         * Use scope option instead.
          * 
          * The option will be converted to a <code>java.lang.Boolean</code>
          * type.
          * 
          * Group: common
          */
+        @Deprecated
         default ClassEndpointBuilder cache(String cache) {
             doSetProperty("cache", cache);
             return this;
@@ -77,28 +76,52 @@ public interface ClassEndpointBuilderFactory {
             return this;
         }
         /**
-         * Used for configuring additional properties on the bean.
+         * Scope of bean. When using singleton scope (default) the bean is
+         * created or looked up only once and reused for the lifetime of the
+         * endpoint. The bean should be thread-safe in case concurrent threads
+         * is calling the bean at the same time. When using request scope the
+         * bean is created or looked up once per request (exchange). This can be
+         * used if you want to store state on a bean while processing a request
+         * and you want to call the same bean instance multiple times while
+         * processing the request. The bean does not have to be thread-safe as
+         * the instance is only called from the same request. When using
+         * prototype scope, then the bean will be looked up or created per call.
+         * However in case of lookup then this is delegated to the bean registry
+         * such as Spring or CDI (if in use), which depends on their
+         * configuration can act as either singleton or prototype scope. so when
+         * using prototype then this depends on the delegated registry.
          * 
-         * The option is a: <code>java.util.Map&lt;java.lang.String,
-         * java.lang.Object&gt;</code> type.
+         * The option is a: <code>org.apache.camel.BeanScope</code> type.
          * 
          * Group: common
          */
-        default ClassEndpointBuilder parameters(Map<String, Object> parameters) {
-            doSetProperty("parameters", parameters);
+        default ClassEndpointBuilder scope(BeanScope scope) {
+            doSetProperty("scope", scope);
             return this;
         }
         /**
-         * Used for configuring additional properties on the bean.
+         * Scope of bean. When using singleton scope (default) the bean is
+         * created or looked up only once and reused for the lifetime of the
+         * endpoint. The bean should be thread-safe in case concurrent threads
+         * is calling the bean at the same time. When using request scope the
+         * bean is created or looked up once per request (exchange). This can be
+         * used if you want to store state on a bean while processing a request
+         * and you want to call the same bean instance multiple times while
+         * processing the request. The bean does not have to be thread-safe as
+         * the instance is only called from the same request. When using
+         * prototype scope, then the bean will be looked up or created per call.
+         * However in case of lookup then this is delegated to the bean registry
+         * such as Spring or CDI (if in use), which depends on their
+         * configuration can act as either singleton or prototype scope. so when
+         * using prototype then this depends on the delegated registry.
          * 
          * The option will be converted to a
-         * <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code>
-         * type.
+         * <code>org.apache.camel.BeanScope</code> type.
          * 
          * Group: common
          */
-        default ClassEndpointBuilder parameters(String parameters) {
-            doSetProperty("parameters", parameters);
+        default ClassEndpointBuilder scope(String scope) {
+            doSetProperty("scope", scope);
             return this;
         }
         /**
@@ -177,6 +200,32 @@ public interface ClassEndpointBuilderFactory {
             return this;
         }
         /**
+         * Used for configuring additional properties on the bean.
+         * 
+         * The option is a: <code>java.util.Map&lt;java.lang.String,
+         * java.lang.Object&gt;</code> type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedClassEndpointBuilder parameters(
+                Map<String, Object> parameters) {
+            doSetProperty("parameters", parameters);
+            return this;
+        }
+        /**
+         * Used for configuring additional properties on the bean.
+         * 
+         * The option will be converted to a
+         * <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code>
+         * type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedClassEndpointBuilder parameters(String parameters) {
+            doSetProperty("parameters", parameters);
+            return this;
+        }
+        /**
          * Sets whether synchronous processing should be strictly used, or Camel
          * is allowed to use asynchronous processing (if supported).
          * 
@@ -203,7 +252,7 @@ public interface ClassEndpointBuilderFactory {
     }
     /**
      * Class (camel-bean)
-     * The class component is for invoking Java classes (Java beans) from Camel.
+     * The Class component is for invoking Java classes (Java beans) from Camel.
      * 
      * Category: core,java
      * Since: 2.4
diff --git a/docs/components/modules/ROOT/pages/bean-component.adoc b/docs/components/modules/ROOT/pages/bean-component.adoc
index c512d37..802d06f 100644
--- a/docs/components/modules/ROOT/pages/bean-component.adoc
+++ b/docs/components/modules/ROOT/pages/bean-component.adoc
@@ -24,14 +24,15 @@ the Registry
 
 
 // component options: START
-The Bean component supports 4 options, which are listed below.
+The Bean component supports 5 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *cache* (advanced) | If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope. |  | Boolean
+| *cache* (producer) | *Deprecated* Use singleton option instead. | true | Boolean
+| *scope* (producer) | Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent threads is calling the bean at the same time. When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean while processing a request and you want to call the same bean instance multiple times while  [...]
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
@@ -59,17 +60,18 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (6 parameters):
+=== Query Parameters (7 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *cache* (common) | If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope. |  | Boolean
+| *cache* (common) | *Deprecated* Use scope option instead. |  | Boolean
 | *method* (common) | Sets the name of the method to invoke on the bean |  | String
-| *parameters* (common) | Used for configuring additional properties on the bean |  | Map
+| *scope* (common) | Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent threads is calling the bean at the same time. When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean while processing a request and you want to call the same bean instance multiple times while pr [...]
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
+| *parameters* (advanced) | Used for configuring additional properties on the bean |  | Map
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 |===
 // endpoint options: END
diff --git a/docs/components/modules/ROOT/pages/class-component.adoc b/docs/components/modules/ROOT/pages/class-component.adoc
index d95ac1d..8880097 100644
--- a/docs/components/modules/ROOT/pages/class-component.adoc
+++ b/docs/components/modules/ROOT/pages/class-component.adoc
@@ -27,14 +27,15 @@ bean.
 
 
 // component options: START
-The Class component supports 4 options, which are listed below.
+The Class component supports 5 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *cache* (advanced) | If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope. |  | Boolean
+| *cache* (producer) | *Deprecated* Use singleton option instead. | true | Boolean
+| *scope* (producer) | Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent threads is calling the bean at the same time. When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean while processing a request and you want to call the same bean instance multiple times while  [...]
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
@@ -62,17 +63,18 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (6 parameters):
+=== Query Parameters (7 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *cache* (common) | If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope. |  | Boolean
+| *cache* (common) | *Deprecated* Use scope option instead. |  | Boolean
 | *method* (common) | Sets the name of the method to invoke on the bean |  | String
-| *parameters* (common) | Used for configuring additional properties on the bean |  | Map
+| *scope* (common) | Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent threads is calling the bean at the same time. When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean while processing a request and you want to call the same bean instance multiple times while pr [...]
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
+| *parameters* (advanced) | Used for configuring additional properties on the bean |  | Map
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 |===
 // endpoint options: END
diff --git a/docs/components/modules/ROOT/pages/index.adoc b/docs/components/modules/ROOT/pages/index.adoc
index 57e606f..94275f8 100644
--- a/docs/components/modules/ROOT/pages/index.adoc
+++ b/docs/components/modules/ROOT/pages/index.adoc
@@ -114,7 +114,7 @@ Number of Components: 307 in 245 JAR artifacts (1 deprecated)
 
 | xref:chunk-component.adoc[Chunk] (camel-chunk) | 2.15 | Transforms the message using a Chunk template.
 
-| xref:class-component.adoc[Class] (camel-bean) | 2.4 | The class component is for invoking Java classes (Java beans) from Camel.
+| xref:class-component.adoc[Class] (camel-bean) | 2.4 | The Class component is for invoking Java classes (Java beans) from Camel.
 
 | xref:cm-sms-component.adoc[CM SMS Gateway] (camel-cm-sms) | 2.18 | The cm-sms component allows to integrate with CM SMS Gateway.
 
diff --git a/docs/user-manual/modules/ROOT/pages/bean-eip.adoc b/docs/user-manual/modules/ROOT/pages/bean-eip.adoc
index ddb5e4b..eaf39c8 100644
--- a/docs/user-manual/modules/ROOT/pages/bean-eip.adoc
+++ b/docs/user-manual/modules/ROOT/pages/bean-eip.adoc
@@ -17,7 +17,7 @@ the xref:registry.adoc[Registry]
 == EIP options
 
 // eip options: START
-The Bean EIP supports 4 options which are listed below:
+The Bean EIP supports 5 options which are listed below:
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
@@ -25,10 +25,22 @@ The Bean EIP supports 4 options which are listed below:
 | *ref* | Sets a reference to a bean to use |  | String
 | *method* | Sets the method name on the bean to use |  | String
 | *beanType* | Sets the Class of the bean |  | String
-| *cache* | Caches the bean lookup, to avoid lookup up bean on every usage. | true | Boolean
+| *cache* | *Deprecated* Use scope option instead. |  | Boolean
+| *scope* | Scope of bean. See below for more details. | Singleton | String |
 |===
 // eip options: END
 
+=== Bean scope
+
+When using `singleton` scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint.
+The bean should be thread-safe in case concurrent threads is calling the bean at the same time.
+When using `request` scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean
+while processing a request and you want to call the same bean instance multiple times while processing the request.
+The bean does not have to be thread-safe as the instance is only called from the same request.
+When using `prototype` scope, then the bean will be looked up or created per call. However in case of lookup then this is delegated
+to the bean registry such as Spring or CDI (if in use), which depends on their configuration can act as either singleton or prototype scope.
+so when using `prototype` then this depends on the delegated registry.
+
 == Bean as endpoint
 
 Camel also supports invoking xref:components::bean-component.adoc[Bean] as an Endpoint. In the
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide.adoc
index 00599a2..329a36a 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide.adoc
@@ -11,6 +11,15 @@ from both 3.0 to 3.1 and 3.1 to 3.2.
 
 == Upgrading Camel 3.0 to 3.1
 
+=== came-bean
+
+The bean component has been changed to behave as singleton scoped by default.
+This means that the bean is created or looked up once and reused.
+
+The option `cache` has been deprecated in favour of the new `scope` option that by default is `Singleton`. You can set this to `Prototype` to use the old behaviour.
+
+NOTE: Setting this to Prototype will let Camel create/lookup a new bean instance, per use; which acts as prototype scoped. However beware that if you lookup the bean, then the registry that holds the bean, would return a bean accordingly to its configuration, which can be singleton or prototype scoped. For example if you use Spring, or CDI, which has their own settings for setting bean scopes.
+
 === camel-nats
 
 The `camel-nats` component has changed its endpoint syntax from `nats:servers` to `nats:topic`.