On 2/8/11 11:15 PM, sebastien.petrucci wrote:

Hi gurus,

I am currently developing some specific extensions for Camel. Today, it
looks like that:

(declaring spring bean using custom XML)
<mycompany:semantic-validation id="validator1" type-package="..." />

<route>
    <from uri="..." />
    <processor ref="validator1" />
    <to uri="...">
</route>


To make it easier for my customers, I would like to extend the Spring DSL
and end up with something like that:

<route>
    <from uri="..." />
    <mycompany:semantic-validation type-package="..." />
    <to uri="...">
</route>

I spent some time looking at how 'camel-spring' is implemented and searching
the web. Turns out that JAXB is used to parse the Spring DSL. The Camel XSD
is generated from the code and apparently not easy to extend.

I tried some tricks to try to extend the DSL *WITHOUT TOUCHING camel-spring*
... without any success so far.
Did anyone managed to do something like that ?
I don't think you can do it without touching the camel-spring and camel-core code. Because Camel route supports Java DSL and Spring DSL at the same time, current architecture make sure the DSL module is coming from the Java code for better maintenance.


Also, as a longer term evolution, is there any plan for supporting DSL
extensions in the Fuse IDE project ?

Regards,
Sebastien.


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Reply via email to