camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edvicif <>
Subject Refering implicitly to routeContext
Date Thu, 28 Mar 2013 15:25:57 GMT

I want to develop an interceptor, which I can turn on on demand using spring
DSL, by adding the xml file to the spring configuration list.

So what I want to have

<routeContext id="sg">
  <interceptFrom uri="direct:something"/>
  <to uri="..."/>

Sometimes I want to run configs: normal-config.xml
but sometimgs normal-config.xml,myInterceptor.xml

I was only able to find examples, that I explicit refer to these context

<routeContextRef ref="sg"/> in the camelContext node. But I want to avoid it
as I don't want to modify the original camelContext definition.

The camelContext has packageScan and contextScan function. I was able to
achieve my goal with that to dynamically add route. Unfortunately I have to
define the route using JAVA.

Can I achieve somehow, that if I list of the XML files for Spring and
contains route definitions beans they add them self to the camelContext?

I understand there will be an issue, when I define multiple camel context.

Other think I realized that if I want to define an interceptor in
routeContext I must define a dummy from, to node before the interceptor
definition. Am I doing something wrong here?

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

View raw message