You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Arnaud Deprez <ar...@gmail.com> on 2016/05/11 21:48:27 UTC
Restriction in RestConfiguration with blueprint
Hi riders,
In camel 2.16.X, I was able to use configure a RestConfiguration in
blueprint with property placeholder as bellow:
<camelContext id="rest-api" allowUseOriginalMessage="false" xmlns="
http://camel.apache.org/schema/blueprint">
<restConfiguration component="{{camel.rest.component}}"
port="{{camel.rest.port}}" contextPath="{{camel.rest.contextPath}}"/>
....
</camelContext>
But since camel 2.16.3 and also in camel 2.17.X and 2.18-SNAPSHOT, it
doesn't work anymore, it is actually unable to resolve the property
placeholder and says that ie. camel can't found a RestConsumerFactory
{{camel.rest.component}}
in the registry.
I think it's related to the fix bring with issue:
https://issues.apache.org/jira/browse/CAMEL-9483
So, according to me, here:
https://github.com/apache/camel/commit/b1555bae4a878135a8681d9bbe895f1f97c96870
at line 996, I think, we should have something like:
String component = CamelContextHelper.parseText(camelContext,
ccfb.getRestConfiguration().getComponent());
instead of
String component = ccfb.getRestConfiguration().getComponent();
Apparently, I can't create a jira issue (can't actually select the Camel
project).
I didn't have time to test it yet, but I'll try to do it soon when I have.
I might also be wrong so please don't hesitate to correct me if I am or
give me some advice if needed.
Regards
--
Arnaud Deprez
Software Engineer
Phone: +32 497 23 30 44
Linked'In: https://www.linkedin.com/in/deprezarnaud
Github: https://github.com/arnaud-deprez
Re: Restriction in RestConfiguration with blueprint
Posted by Arnaud Deprez <ar...@gmail.com>.
Yeah, I agree Claus.
That's why I'm not a big fan of my proposed solution, It would be cleaner
if the CamelContext (or CamelContextFactoryBean) itself resolved
PropertyPlaceHolder on its own without regarding the implementation
(spring, blueprint, cdi, whatever).
Regards,
On Fri, May 13, 2016 at 7:42 AM Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Yeah we should avoid setting up those dependencies from the parser if
> they values are using property placeholders
> https://issues.apache.org/jira/browse/CAMEL-9963
>
> On Wed, May 11, 2016 at 11:48 PM, Arnaud Deprez <ar...@gmail.com>
> wrote:
> > Hi riders,
> >
> > In camel 2.16.X, I was able to use configure a RestConfiguration in
> > blueprint with property placeholder as bellow:
> >
> > <camelContext id="rest-api" allowUseOriginalMessage="false" xmlns="
> > http://camel.apache.org/schema/blueprint">
> > <restConfiguration component="{{camel.rest.component}}"
> > port="{{camel.rest.port}}" contextPath="{{camel.rest.contextPath}}"/>
> > ....
> > </camelContext>
> >
> > But since camel 2.16.3 and also in camel 2.17.X and 2.18-SNAPSHOT, it
> > doesn't work anymore, it is actually unable to resolve the property
> > placeholder and says that ie. camel can't found a RestConsumerFactory
> > {{camel.rest.component}}
> > in the registry.
> >
> > I think it's related to the fix bring with issue:
> > https://issues.apache.org/jira/browse/CAMEL-9483
> >
> > So, according to me, here:
> >
> https://github.com/apache/camel/commit/b1555bae4a878135a8681d9bbe895f1f97c96870
> > at line 996, I think, we should have something like:
> > String component = CamelContextHelper.parseText(camelContext,
> > ccfb.getRestConfiguration().getComponent());
> > instead of
> > String component = ccfb.getRestConfiguration().getComponent();
> >
> > Apparently, I can't create a jira issue (can't actually select the Camel
> > project).
> > I didn't have time to test it yet, but I'll try to do it soon when I
> have.
> >
> > I might also be wrong so please don't hesitate to correct me if I am or
> > give me some advice if needed.
> >
> > Regards
> > --
> > Arnaud Deprez
> > Software Engineer
> > Phone: +32 497 23 30 44
> > Linked'In: https://www.linkedin.com/in/deprezarnaud
> > Github: https://github.com/arnaud-deprez
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
--
Arnaud Deprez
Software Engineer
Phone: +32 497 23 30 44
Linked'In: https://www.linkedin.com/in/deprezarnaud
Github: https://github.com/arnaud-deprez
Re: Restriction in RestConfiguration with blueprint
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Yeah we should avoid setting up those dependencies from the parser if
they values are using property placeholders
https://issues.apache.org/jira/browse/CAMEL-9963
On Wed, May 11, 2016 at 11:48 PM, Arnaud Deprez <ar...@gmail.com> wrote:
> Hi riders,
>
> In camel 2.16.X, I was able to use configure a RestConfiguration in
> blueprint with property placeholder as bellow:
>
> <camelContext id="rest-api" allowUseOriginalMessage="false" xmlns="
> http://camel.apache.org/schema/blueprint">
> <restConfiguration component="{{camel.rest.component}}"
> port="{{camel.rest.port}}" contextPath="{{camel.rest.contextPath}}"/>
> ....
> </camelContext>
>
> But since camel 2.16.3 and also in camel 2.17.X and 2.18-SNAPSHOT, it
> doesn't work anymore, it is actually unable to resolve the property
> placeholder and says that ie. camel can't found a RestConsumerFactory
> {{camel.rest.component}}
> in the registry.
>
> I think it's related to the fix bring with issue:
> https://issues.apache.org/jira/browse/CAMEL-9483
>
> So, according to me, here:
> https://github.com/apache/camel/commit/b1555bae4a878135a8681d9bbe895f1f97c96870
> at line 996, I think, we should have something like:
> String component = CamelContextHelper.parseText(camelContext,
> ccfb.getRestConfiguration().getComponent());
> instead of
> String component = ccfb.getRestConfiguration().getComponent();
>
> Apparently, I can't create a jira issue (can't actually select the Camel
> project).
> I didn't have time to test it yet, but I'll try to do it soon when I have.
>
> I might also be wrong so please don't hesitate to correct me if I am or
> give me some advice if needed.
>
> Regards
> --
> Arnaud Deprez
> Software Engineer
> Phone: +32 497 23 30 44
> Linked'In: https://www.linkedin.com/in/deprezarnaud
> Github: https://github.com/arnaud-deprez
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2