I'm thinking that it would still be nice to have a <providers> section too, so that we can have multiple routes in one CamelContext. Since, if you do this:
<listeners>
<camel-gateway from="file://xxx" />
<camel-gateway from="ftp://yyy" />
</listeners>
, we would have to create 2 different CamelContexts, one for each gateway. However, if we do this:
<providers>
<camel-provider name="...">
<camel-bus busid="foo">
<from uri="file://xxx" />
<from uri="ftp://yyy" />
</camel-bus>
</camel-provider>
</providers>
<services>
<listeners>
<camel-gateway name="..." busidref="foo" />
</listeners>
<actions>...</actions>
</services>
, then we can have multiple Camel routes as part of a single CamelContext - on per bus. I also like using the <from> tag in the <camel-bus> section, as it is familiar to current Camel users. The only caveat - for 4.x, anyway - is that ONLY the <from> tag would be supported by us.
What do you think? Should we also allow the <camel-gateway from="" /> shorthand? I wonder if we can define in XSD that you use either the busidref attribute, OR the from attribute? Or maybe we let them do both, and all "from's" get put into the same CamelContext?