Hi This sounds fine. You can reuse routes from Java code using the usual Java way with inheritance or composition.
What some people are doing is have a abstract base route builder class with their common routes / error handler etc. And then extend this class and calls super.configure() On Mon, Sep 15, 2014 at 5:29 PM, toomanyedwards <[email protected]> wrote: > Hey all, > I have several "direct:" routes that I'd like to be able to reuse across > multiple standalone camel projects. I am currently using Java DSL to define > my routes. Can anyone point me to any existing patterns for creating > reusable route definitions? > > The solution I've come up with is creating a "RouteConfigurer" Java > interface that has one method: RouteDefinition configure(RouteBuilder) I > have specific classes that implement this interface that configure the > RouteDefinitions I want to reuse so that I can use them in different Camel > projects. > > I feel like I'm probably reinventing the wheel here. Are there any > established patterns/route libraries that already do this better? > > -e > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Reusable-route-definitions-tp5756545.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
