camel-users mailing list archives

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

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
myInterceptor.xml

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

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
through:

<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: http://camel.465427.n5.nabble.com/Refering-implicitly-to-routeContext-tp5730047.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message