On Mon, Jan 11, 2010 at 2:29 PM, yaog <[email protected]> wrote:
>
> If I define a route like this:
>
>                <route id="route1">
>                        <from uri="direct:start" />
>                        <to uri="bean:compAImpl" />
>                        <loadBalance>
>                                <camel:failover/>
>                                <to uri="bean:compBImpl" />
>                                <to uri="bean:compCImpl" />
>                        </loadBalance>
>                </route>
>
> and comp B throw exception, failing over to C works ok.
>
> how ever, if I define this route:
>
>                <route id="route1">
>                        <from uri="direct:start" />
>                        <to uri="bean:compAImpl" />
>                        <loadBalance>
>                                <camel:failover/>
>                                <to uri="jms:compB" />
>                                <to uri="jms:compC" />
>                        </loadBalance>
>                </route>
>
>
>                <route id="route2">
>                        <from uri="jms:compB" />
>                        <to uri="bean:compBImpl" />
>                </route>
>
>                <route id="route3">
>                        <from uri="jms:compC" />
>                        <to uri="bean:compCImpl" />
>                </route>
>
>
> and compB throw an exception, then the exception is logged but C is not
> invoked.
>
> can't fail over recover from failures after consumed by the jms queue?
>

Exceptions cannot normally be transferred over JMS. Its just an
exchange of the payload.
You cannot always assume both sides of JMS have the same classes on
the classpath.
But since you do some testing I assume you run all in the same JVM.

You can enable the transferException=true option on the JMS endpoint
to let it transfer exceptions over JMS.
Then the failover should work.



> will adding a transaction manager aid here?
> --
> View this message in context: 
> http://old.nabble.com/fail-over-does-not-work-with-jms----tp27110432p27110432.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to