That seems like a good alternative syntax. However the result is the same
(even when setting the argument hardcoded):
No bean could be found in the registry for: MyProcessor-1
The only difference by setting it this way, is that the error shows during
loading, instead of during running the route.
Btw there is some details on #class syntax here
https://camel.apache.org/components/3.18.x/others/main.html#_creating_a_custom_bean_with_constructor_parameters
On Thu, Sep 8, 2022 at 2:52 PM Claus Ibsen wrote:
>
>
> On Thu, Sep 8, 2022 at 2:39 PM ski n wrote:
>
>> Yes, that was, based on the do
On Thu, Sep 8, 2022 at 2:39 PM ski n wrote:
> Yes, that was, based on the documentation, the first thing I tried, but I
> got:
>
> org.apache.camel.ResolveEndpointFailedException: Failed to resolve
> endpoint: bean://MyProcessor-1?method=process) due to: No bean could be
> found in the registry f
Yes, that was, based on the documentation, the first thing I tried, but I
got:
org.apache.camel.ResolveEndpointFailedException: Failed to resolve
endpoint: bean://MyProcessor-1?method=process) due to: No bean could be
found in the registry for: MyProcessor-1
That's why I started to register it ma
You should NOT register the processor yourself, this is done by the
template bean thingy automatically
On Thu, Sep 8, 2022 at 1:39 PM ski n wrote:
> OK, sorry, I actually read the documentation on bindings and did use
> {{MyProcessor}} as the bean name.
>
> But it didn't work.
>
> I register my
OK, sorry, I actually read the documentation on bindings and did use
{{MyProcessor}} as the bean name.
But it didn't work.
I register my bean/processor as:
registry.bind("MyProcessor", new MyProcessor(""));
But when I run it, I got:
Failed to resolve endpoint: bean://MyProcessor-1?method=proce
Hi
No you cannot - you mix standard Java with Camel "parsing" the model when
it calls the configure() method.
It would be the same in regular Camel route.
You basically do standard Java code with a new constructor and pass in a
string literal. Camel is not in use at that point.
In your template b
Hi,
I have a routetemplate as follows:
routeTemplate("processortemplate")
.templateParameter("out")
.from("direct:in")
.process("MyProcessor")
.to("{{out}}");
This works.
The processor is registered an the called by reference. Now I added a
constructor argum