camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel 2.0 - pass uri reference using variable ${my_Uri}
Date Tue, 05 May 2009 07:31:54 GMT
Hi

Last time we checked it required Spring 3.0 as Spring 2.5 did not
support the property placeholders in custom namespace handlers.
There is a ticket in Camel JIRA that has a link to the ticket in Spring JIRA.

However if you define you endpoints with the <endpoint id="xxx" uri="${foo}"/>
then you can use property placeholders.

There is also a FAQ about this:
http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html


On Tue, May 5, 2009 at 9:23 AM, Charles Moulliard <cmoulliard@gmail.com> wrote:
> Hi,
>
> I would like to know if something is planned to support uri declaration for
> Camel routes using variable like by example : ${my_Uri}
>
> e.g.
>
> <camel:route>
> <camel:from uri="${uriFile}" />
>    <camel:setHeader headerName="origin">
>        <camel:constant>file</camel:constant>
>    </camel:setHeader>
> <camel:unmarshal ref="bindyDataformat" />
> <camel:to uri="${queueIn}" />
> </camel:route>
>
> and
>
> osgix:cm-properties like this
>
> <osgix:cm-properties id="camelProps"
> persistent-id="org.apache.camel.example.reportincident.routing">
>    <prop key="uriFile">file://c:/temp/data/?move=c:/temp/done/${file:name}<file:///c:/temp/data/?move=c:/temp/done/$%7Bfile:name%7D></prop>
> (2)
>    <prop key="queueIn">queuingservice:queue:in</prop> (1)
> </osgix:cm-properties>
>
> <context:property-placeholder properties-ref="camelProps">
>
> Remarks :
> - ${file:name} is a camel property so we will have issues with Spring
> because ${ and } are reserved characters
> - The example provided here generates Camel error : see
> https://issues.apache.org/activemq/browse/CAMEL-1577
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration
Interview with me:
http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=7893-progress

Mime
View raw message