camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wolf <>
Subject I want to call CamelContext.addRouteDefinition, but it's deprecated - how do I get ModelCamelContext?
Date Fri, 17 May 2013 20:08:36 GMT
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)



View raw message