2009/1/27 Ramon Buckland <ra...@thebuckland.com>:
> Because of the nature of moving paths (and shifting systems from dev to UAT
> and UAT to production) we have found using XML is good for it's flexibile
> change capabilities.
>
> However, I have as usual the XML has pain, that the XML's config becomes
> cumbersome (we have all been there).
>
> I was wondering, has anyone thought of (or is there) a dynamic form of the
> Java DSL .. like .. jsp's or the old jws files in Axis, which are compiled
> on demand.
>
> <camelContext id="camel"...>
>    <routeBuilder resource="path/to/myrouteBuilder.crb"/>
> </camelContext>
>
> And crb is just a java source file which will get compiled and then loaded
> ... ?thoughts
> What this means is the crb (camel route builder) can be "seen" by
> application support staff, and paths modified and server restarted for
> changes etc ..
>
> of course .. goes without saying that I am sure groovy could be plugged in
> some how in the same manner (no ? )

Hello Ramon,

Don't forget, that route builder is a POJO after all, so you can
configure it however you like using spring. Then you just have to
reference your route builder from camel context via <routeBuilderRef/>
element.

Another solution is that you could actively pull your configuration
from Spring/JNDI/... using

getContext().getRegistry().lookup(name);

in your configure() method, so you will configure yourself. This way
you have the best from both worlds - nice tooling and easy notation of
java and flexibility of XML.

Hope it helps

Roman

Reply via email to