Tarandeep,

It looks that you don't check the status of MessageExchange you receive at all.

I remember some time ago (in version fuse-3.3.0.2) it was impossible
to send messages from bean endpoints because Bean endpoint couldn't
match the response with the request and it was throwing exceptions.
Anyway, even if it works now then responses (DONE messages in this
case) from camel return to your bean endpoint using onMessageExchange
method so you have a loop without an end condition ;) Whenever camel
finishes its work and sends DONE to bean endpoint you send another
request to camel.

Roman

2008/5/31 taran <[EMAIL PROTECTED]>:
>
> Hi,
> I'm routing a message from bean endpoint to camel endpoint.
> Then, in my camel route builder, i'm routing message from this camel
> endpoint to log.
>
> But, when a message is sent to bean endpoint, it starts polling.
>
> my bean endpoint code is:
> public void onMessageExchange(MessageExchange reverseExchange)
>                        throws MessagingException {
>                System.out.println(" ### INSIDE MerlinBureauPreferenceBean ### 
> ");
>                ServiceEndpoint serviceEndpoint = context.getEndpoint(new
> QName("http://com.thirdpillar.scoring";, "CamelService"),"CamelEndpoint");
>                InOnly forwardExchange =
> channel.createExchangeFactory(serviceEndpoint).createInOnlyExchange();
>
>        MessageUtil.transferInToIn(reverseExchange, forwardExchange);
>        channel.send(forwardExchange);
>        }
>
> and my camel route builder code is:
> from("jbi:endpoint:http://com.thirdpillar.scoring/CamelService/CamelEndpoint";)
>         .convertBodyTo(DOMSource.class)
>         .splitter(XPathBuilder.xpath("//typ:Party").namespace("typ",
> "http://thirdpillar.com/scoring";))
>         .convertBodyTo(String.class)
>         .to("log:scoring-scoringrouter2")
>         .to(SEDA_CHOICE);
>
> when i send a message to bean endpoint, i keep getting system.out.println
> "### INSIDE MerlinBureauPreferenceBean ### " on the servicemix console.
>
> Request for urgent help on this.
>
> best regards
> tarandeep
> --
> View this message in context: 
> http://www.nabble.com/Routing-message-to-camel-endpoint-results-in-polling-tp17573215s22882p17573215.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Reply via email to