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 contexts defined in blueprint... Is that true? On 25 November 2014 at 13:06, Claus Ibsen <claus.ib...@gmail.com> wrote: > 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 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 mostly used for unit tests. > > 2. Use routeContext to define the routes. > > > > Can anyone tell me what is the difference and the intended use of 1 and > 2? > > > > What limitations they have compared to normal routes defined in Java DSL > or > > XML DSL? > > > > > > [1] http://camel.apache.org/loading-routes-from-xml-files.html > > [2] > http://camel.apache.org/how-do-i-import-routes-from-other-xml-files.html > > > > TIA, > > > > -- > > Bilgin Ibryam > > > > Red Hat, Inc. > > Apache Camel & Apache OFBiz committer > > Blog: ofbizian.com > > Twitter: @bibryam <https://twitter.com/bibryam> > > > > Author of Instant Apache Camel Message Routing > > http://www.amazon.com/dp/1783283475 > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: cib...@redhat.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > hawtio: http://hawt.io/ > fabric8: http://fabric8.io/ > -- Bilgin Ibryam Red Hat, Inc. Apache Camel & Apache OFBiz committer Blog: ofbizian.com Twitter: @bibryam <https://twitter.com/bibryam> Author of Instant Apache Camel Message Routing http://www.amazon.com/dp/1783283475