Best way for reusing routes

2014-11-25 Thread Bilgin Ibryam
Hi all, I'd like to write couple of route definitions that will be reused in multiple places. If I use the Java DSL it is straight forward, I can reuse the RouteBuilder class in many places, but I want to use the XML DSL and I can see two options: 1. Use routes statements. Looks like it is

Re: Best way for reusing routes

2014-11-25 Thread Bilgin Ibryam
Further looking into that, the docs say routeContext is isolated and that that it cannot use onException, intercept, dataFormats from the camelcontext but looking into latest Camel code it can use Does the doc out of date or I'm misinterpreting it? On 25 November 2014 at 11:18, Bilgin Ibryam

Re: Best way for reusing routes

2014-11-25 Thread Claus Ibsen
1 and 2 boils down to the same. routeContextRef will load the routes the same was as #1 does. On Tue, Nov 25, 2014 at 12:18 PM, Bilgin Ibryam bibr...@gmail.com wrote: Hi all, I'd like to write couple of route definitions that will be reused in multiple places. If I use the Java DSL it is

Re: Best way for reusing routes

2014-11-25 Thread Bilgin Ibryam
Thanks Claus. And from top of your head, can you tell me how much is 1 and 2 different to defining routes in a camelContex element? My guess is that I have to go with Java DSL to be on the safe side and be sure that the route definitions will function properly and reused in different camel