2008/4/21, Ovidius <[EMAIL PROTECTED]>:
> RomKal wrote:
> >
> > 2008/4/21, Ovidius <[EMAIL PROTECTED]>:
> >>
> >> Hi,
> >>
> >> I need to send properties of an existing object to different routes.
> >>
> >> Ex: I have one object with two propertie : data and info
> >> I need to send property "data" on direct:dataProcessor and
> >> property "info" on direct:infoProcessor .
> >>
> >> Can i use splitter EIP for this purpose?
> >
> > Why don't you just set them in correct routes like:
> >
> >
> from("direct:start).multicast().to("direct:dataProcessor","direct:infoProcessor");
> > from("direct:dataProcessor").setBody().el("in.body.data")...
> > from("direct:infoProcessor").setBody().el("in.body.info")...
> >
> > Roman
> >
> >
>
>
> Hi,
>
> I use something like:
>
> <multicast>
> <splitter>
> <ognl>request.body.dto</ognl>
> <to uri="direct:dtoProcessor"/>
> </splitter>
> <splitter>
> <ognl>request.body.info</ognl>
> <to uri="direct:infoProcessor"/>
> </splitter>
> </multicast>
>
> Is the correct approach?
Basically it is correct. The question is if dto and info fields are
collection/arrays or not.
If they are, then it is perfectly OK. If they are not, then the
presence of splitter is misleading here (but works anyway).
Roman