Have you tried using interceptors?

https://camel.apache.org/intercept.html
https://camel.apache.org/advicewith.html

On 30 January 2016 at 14:19, Ranx <brad.john...@mediadriver.com> wrote:

> I'm currently creating test stubs for use with my blueprint tests and for
> use
> in deployment and testing.  I've tried various methods with varying degrees
> of luck.
>
> Is there a way to substitute a class name at start up?  I could create a
> factory class to do a class for name on it but would prefer to use standard
> mechanisms.
>
> <bean id="supplierServiceImpl" class="${serviceImpl}" />
>
> In my camel context if I use this it works fine:
>                 <route id="GetSuppliers">
>                         <from uri="{{suppliers.info.endpoint}}" />
>                         <to
> uri="class:{{serviceImpl}}?method=getSuppliers" />
>                 </route>
>
> And if I use this in the preamble section above the context it works fine:
> <cxf:rsServer id=&quot;cxfRsServer&quot;
> address=&quot;${CXFServer}:${proxy.port}/resources&quot;
>
> So the properties are getting passed in but it doesn't like using the class
> substitution.  I even tried wild swings like &lt;bean
> id=&quot;supplierServiceImpl&quot; class=&quot;class:${serviceImpl}&quot;
> />.  But at that point I'm just guessing.
>
> Any help is appreciated.
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Class-substitution-in-bean-tp5777061.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Matt Sicker <boa...@gmail.com>

Reply via email to