camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <r...@fusesource.com>
Subject Re: Dynamically loading XML configured routes
Date Wed, 21 Dec 2011 14:39:46 GMT
Hi David,

It looks like Spring allows you to scan the classpath for bean definitions
to import, using wildcards, e.g.:

<import resource="classpath:./camel-route-*.xml" />

So you can potentially import many routeContext definitions into your
registry in a batch.

However, it looks like the <routeContextDef /> currently requires the name
of the RouteContext bean to import. Unless someone else has another
suggestion, I would recommend you open a JIRA to extend the
<routeContextDef /> element with something like an scanRegistry="true"
attribute to trigger a search in the Registry for RouteContext definitions
to import.

Regards,
Raúl.

On 20 December 2011 19:39, db <david.balzan@entity.co.uk> wrote:

> Hello
>
> I need to externalise mappings with Spring XML as per the example here:
> http://camel.apache.org/how-do-i-import-routes-from-other-xml-files.html
>
> I'm after a solution that automatically adds all configured routes to my
> single Camel context.
>
> It seems that Camel has a <packageScan> feature which does what I need but
> I
> can't see how to make this work with XML configured routes.
>
> Does anyone have a solution?
>
> Thanks
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Dynamically-loading-XML-configured-routes-tp5089872p5089872.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message