You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2012/09/19 08:16:07 UTC

[jira] [Commented] (CAMEL-5616) Share properties configuration between CDI and CamelContext

    [ https://issues.apache.org/jira/browse/CAMEL-5616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458442#comment-13458442 ] 

Claus Ibsen commented on CAMEL-5616:
------------------------------------

Lukasz, does DeltaSpike supports resolving multiple properties in the same text?

The API on CamelContext supports resolving placeholders intermixed withe regular text (eg hence the name ending with ...s, and as stated in its javadoc, which maybe could be emphasized a bit on that part). An example would be a camel endpoint uri, eg "ftp:{{myServer}}:{{port}}/foo/bar". Then it resolves the 2 placeholders, myServer and port, returning lets say "ftp:someserver.com:21/foo/bar".

If DeltaSpike cannot do that, then the patch is wrong; which I suspect is the case. 

You should integrate this on the component level instead. There is a PropertiesComponent that supports pluggable property resolver, that lookup a single property at a time. This is how we eg do it with blueprint. Take a look in camel-blueprint. 

                
> Share properties configuration between CDI and CamelContext
> -----------------------------------------------------------
>
>                 Key: CAMEL-5616
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5616
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cdi
>            Reporter: Ɓukasz Dywicki
>            Assignee: Hadrian Zbarcea
>             Fix For: 2.11.0
>
>         Attachments: CAMEL-5616-new.patch
>
>
> Apache DeltaSpike provides convenient way to inject configuration using @ConfigProperty value.
> In ideal world @ConfigProperty injected by deltaspike should be same as configuration property visible from Camel Context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira