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: is that possible to use properties in the uri attribute of InterceptSendToEndpoint?
Date Wed, 03 Nov 2010 05:42:06 GMT
Hi

This is possible with Camel 2.5 onwards. (CAMEL-3210)


On Tue, Nov 2, 2010 at 10:16 PM, yli <yimingLearnCamel@gmail.com> wrote:
>
> Hi All,
>        I am trying to use properties in the uri part of
> InterceptSendToEndpoint, but no luck.
>        Here is example code(I am using spring and Camel 2.4):
>
>        <bean id="properties"
> class="org.apache.camel.component.properties.PropertiesComponent" />
>            <property name="locations" value="common.properties" />
>        </bean>
>
>        <camel: camelContext id="context">
>             ...
>             <camel:intercaptSendToEndpoint uri="{{sendingURL}}">
>                 <camel:log message="intercepted!" />
>             </camel:intercaptSendToEndpoint>
>             ...
>        </camel:camelContext>
>
>        In the property file "common.properties", I have "sendingURL=
> http://10.1.201.225/myService".
>        As you may have figured out, I wanted to intercept all messages that
> are sent to an http endpoint(http://10.1.201.225/myService) and print
> "intercepted!" in the log.
>        I have also tried to use uri="${properties:sendingURL}", but it
> didn't work either.
>        However, when I replaced uri="{{sendingURL}}" with uri="
> http://10.1.201.225/myService", it just worked.
>
>        Please correct me if I missed anything in the usage of properties
> component and the intercepter.
>
>        When reading the camel document(
> http://camel.apache.org/intercept.html), I found InterceptSendToEndpoint is
> "dynamic" and supports wildcard and regular expression. Doesn't it support
> properties?
>         Thank you very much.
>
> Best
> Yiming
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/is-that-possible-to-use-properties-in-the-uri-attribute-of-InterceptSendToEndpoint-tp3247537p3247537.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message