On Thu, Apr 10, 2014 at 3:14 PM, scottmiles <[email protected]> wrote:
> Assume i have below ValidateOrder
>
> public class ValidateOrder {
>     public void check1(String body) throws ValidationException {
>         // body is the value of Exchange.getIn().getBody(String.class) and
> provided by bean-binding.
>     }
>
>  public void check2(String body) throws ValidationException {
>         // body is the value of Exchange.getIn().getBody(String.class) and
> provided by bean-binding.
>     }
> }
>
>
> Here is my configuration
>
> <route>
>    <from uri="jms:queue:order"/>
>    <bean ref="validateOrder"/>
>    <bean ref="registerOrder"/>
>    <bean ref="sendConfirmEmail"/>
> </route>
>
> will check1 or check2 be called ? Link
> http://camel.apache.org/bean-binding.html says that we can
> mention @Handler on method which needs t be called. Say in one route i need
> to call check1 method and
> in other route need to call check2 method. How it will work?
>

No Camel will only call 1 method. So if you want to call 2 methods, then do

    <bean ref="validateOrder" method="check1"/>
    <bean ref="validateOrder" method="check2"/>



>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-to-use-CAMEL-to-send-the-acknowledgement-and-xml-output-to-vendors-on-different-platform-tp5749906p5750051.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to