You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Gershaw, Geoffrey" <ge...@credit-suisse.com> on 2012/04/19 23:45:12 UTC
Splitter Spring Config
Hello All,
I am trying to use my pojo to do the splitting as mentioned
http://camel.apache.org/splitter.html
<http://camel.apache.org/splitter.html> under "Using a Pojo to do the
splitting". There is no example of how to wire in my pojo using Spring
config. I only see the java DSL. Has anyone done this?
Secondly, I want to call a bean (GenericCamelPublisher ) for every
iteration of the split. I thought this would work, but it complains. Any
ideas?
<split>
<bean ref="GenericCamelPublisher"/>
<to uri="jmsUS:topic:dummy"/>
</split>
Thanks
Geoffrey A. Gershaw
CREDIT SUISSE
Information Technology | Credit eTrading Dev - NY, KVBM 341
One Madison Avenue | 10010 New York | United States
Phone +1 212 538 6727
geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
===============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
===============================================================================
Re: Splitter Spring Config
Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Apr 19, 2012 at 11:45 PM, Gershaw, Geoffrey
<ge...@credit-suisse.com> wrote:
> Hello All,
>
>
>
> I am trying to use my pojo to do the splitting as mentioned
> http://camel.apache.org/splitter.html
> <http://camel.apache.org/splitter.html> under "Using a Pojo to do the
> splitting". There is no example of how to wire in my pojo using Spring
> config. I only see the java DSL. Has anyone done this?
>
Thats easy. Declare the pojo as a spring bean
<bean id="myPojo" ...>
And then use a method call expression in the splitter, to refer to your bean
<camelContext ..>
<split>
<method ref="myPojo" method="splitMe"/>
..
</split>
...
> Secondly, I want to call a bean (GenericCamelPublisher ) for every
> iteration of the split. I thought this would work, but it complains. Any
> ideas?
>
>
>
> <split>
>
> <bean ref="GenericCamelPublisher"/>
>
> <to uri="jmsUS:topic:dummy"/>
>
> </split>
>
> Thanks
>
>
>
> Geoffrey A. Gershaw
>
> CREDIT SUISSE
>
> Information Technology | Credit eTrading Dev - NY, KVBM 341
>
> One Madison Avenue | 10010 New York | United States
>
> Phone +1 212 538 6727
>
> geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
>
>
>
>
> ===============================================================================
> Please access the attached hyperlink for an important electronic communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ===============================================================================
>
--
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/