You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "dr.jeff" <jl...@systechnologies.com> on 2007/04/23 01:40:48 UTC
[camel] Custom Splitters
I know how to make custom splitters in the Camel DSL way by extending
org.apache.camel.builder.ValueBuilder with a new operation that returns my
own Expression, that splits the message in the way I need it to. (And I
think that's the correct general approach to take, but correct me.)
But I just don't see how to do this in the Spring XML way. Am I just dumb,
or what? Can this be even be done?
--
View this message in context: http://www.nabble.com/-camel--Custom-Splitters-tf3627514s2354.html#a10129214
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: [camel] Custom Splitters
Posted by James Strachan <ja...@gmail.com>.
On 4/23/07, dr.jeff <jl...@systechnologies.com> wrote:
> I know how to make custom splitters in the Camel DSL way by extending
> org.apache.camel.builder.ValueBuilder with a new operation that returns my
> own Expression, that splits the message in the way I need it to. (And I
> think that's the correct general approach to take, but correct me.)
Yeah - or you can use a separate class and use a static import in Java
5. So for example the XPath/XQuery or Groovy/Ruby/JavaScript
expressions you can mix and match in the DSL can be merged using
static imports (rather than having a base class).
> But I just don't see how to do this in the Spring XML way. Am I just dumb,
> or what? Can this be even be done?
The Spring XML way hasn't yet caught up with every possibility in the
Java DSL. In particular work is required in the expression area to be
able to easily use expressions with things like splitter,
recipientList, content based router etc. We probably wanna use either
<expression language="xpath">...</expression>
or maybe
<xpath>/foo/bar</xpath>
<groovy>foo.bar.each { i -> i.blah }</groovy>
etc
--
James
-------
http://radio.weblogs.com/0112098/