activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [camel] Custom Splitters
Date Mon, 23 Apr 2007 05:08:00 GMT
On 4/23/07, dr.jeff <> 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

<groovy> { i -> i.blah }</groovy>




View raw message