0 Replies Latest reply on Mar 18, 2013 4:32 PM by Richard T

    custom load balancer / exception handling....

    Richard T Newbie

      in my custom load balancer, I sense an exception and create a custom exception...

      like the following:

       

      Exception ex = exchange.getException();

      myex = new MyException("my exception occurred");

      exchange.setException(myex);

       

      and I have a route similar to this:

       

      from(....).onException(Exception.class).process(myHandler).end()

      .to(...)

      .loadbalancer(new myBalancer())

          .to("node1", "node2")

       

      myHandler will get called for the first exception thrown, however

      it seems to ignore subsequent exceptions...

       

      my guess is that camel needs to know the first exception has be processed

       

      is there a way to "programmatically" set from my "myBalancer()" object when the exception is "handled"? (can't use .handled(true)...)

       

      thanks in advance!