camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Jolliffe <>
Subject Re: RouteDefinition vs Route
Date Sat, 28 Jul 2012 16:54:12 GMT
Thanks Babak

On 28 July 2012 11:42, Babak Vahdat <> wrote:
> Hi
> the easiest is to check their javadoc:

Have done that ...

> Another way around, in the context of the MVC pattern one could claim that
> the RouteDefinition is 'M' (using JAXB for mapping between Java/XML) whereas
> the Route abstraction is both the 'V' as well as 'C'.

I almost get what you are saying but it doesn't quite work for me.  If
the Route is a view (which I know is a bit of a stretch) then it has
to be a view of something.  I guess I would expect to see a
getRouteDefinition() method on the Route in that case.

So my question is that starting from the Context you can get a list of
Routes and a list of RouteDefinitions.  How do these relate to one
another?  I can see that if the Route/RouteDefinitions have an id.
then you can find one from the other through that, but the coupling is
loose and possibly for a good reason.

It seems more that a RouteDefinition is a sort of template for
creating a Route .. probably there is something historic in this as
the javadocs refer specifically to the <route /> element, so there is
clearly a jaxb model type relationship.  Except that the configure()
method of RouteBuilder also creates a RouteDefinition rather than a
Route, so RouteDefinition is a bit broader in its semantics than

Still exploring further .. thanks.

> Babak
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

View raw message