camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: I want to call CamelContext.addRouteDefinition, but it's deprecated - how do I get ModelCamelContext?
Date Sat, 18 May 2013 07:33:53 GMT

Yeah its IMHO a bit unfortunate with the @deprecated on the
CamelContext. But the point was to use ModelCamelContext as this
interface is from the model package. Where as CamelContext is from the
So with the ModelCamelContext you dont have root -> model in the
dependency triage.

On Fri, May 17, 2013 at 10:08 PM, Chris Wolf <> wrote:
> In a custom Processor, I am calling CamelContext.addRouteDefinition -
> but the javadoc says it's deprecated and
> to use org.apache.camel.model.ModelCamelContex.addRouteDefinition(..) instead.
> I see that DefaultCamelContext implements ModelCamelContext, so I just
> cast it like:
> ModelCamelContext context = (ModelCamelContext)exchange.getContext();
> That seems to work too.  What is the difference between these two
> interfaces and the "model"
> sub-package, in general?  (I searched the FAQ and CiA book, but didn't
> find anything)
> Thanks,
> Chris

Claus Ibsen
----------------- The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message