Oh nevermind this one either, this code works. from(pingEndpoint).routePolicyRef("inflightRoutePolicy").bean(PingProcessor.class).to(responseEndpoint);
Only problem I have now is testing my routers with CamelTestSupport, I guess I'll have to switch to CamelSpringTestSupport. Taariq -----Original Message----- From: Taariq Levack [mailto:taar...@itaro.co.za] Sent: 16 June 2010 12:22 PM To: users@camel.apache.org Subject: How to set RoutePolicyRef in java DSL Hi I'm using Spring to set up the context but java to build the routes. I've got the bean for throttling route policy defined in Spring as per the example and in the java route I tried this during configure, after adding a route... RoutesDefinition routeDef = getRouteCollection(); routeDef.route().setRoutePolicyRef("inflightRoutePolicy"); That throws a java.util.NoSuchElementException. Can I do this in java or should I set up the routes in xml? Taariq