Hello! We use the Java DSL to model Camel Routes. The RouteBuilder class that we use for this very Route has an attribute and we would like to use this attribute as a bean inside the Route.
Here is the code snippet: public class CreateScriptRoute extends RouteBuilder { ... private ScriptParams params; @Override public void configure() throws Exception { from("direct:createScriptTransformDBInit") .routeId("createScriptTransformDBInit") .bean(params) // that fails!!! .choice() ... } However when I try I get the following error: Caused by: java.lang.IllegalArgumentException: bean, ref or beanType must be provided at org.apache.camel.model.BeanDefinition.createProcessor(BeanDefinition.java:202) at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:441) at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:179) Is there a way to use the attribute in the bean section of the Route anyway? I need that instance because it is injected especially for testing. Cheers Hilde -- View this message in context: http://camel.465427.n5.nabble.com/Attributes-from-RouteBuilder-as-beans-in-route-tp5715628.html Sent from the Camel - Users mailing list archive at Nabble.com.