lundi 24 mai 2021

What's the alternative to Camel BeanInvocation in camel 3.6.0

I am migrating our project from Camel 2.24.1 to 3.6.0. In the code we use BeanInvocation, where we mention the method that was being called in the bean and other classes inside the method.

The org.apache.camel.component.bean.BeanInvocation is deprecated post 2.24.2.

Is there any alternative approach to achieve this.

public void buildRequest(Exchange exchange) {
 BeanInvocation beanInvocation = new BeanInvocation();
 beanInvocation.setMethod(ExampleBean.class.getMethod("methodName", param1, param2);
    
 ....
 ....
 // Add the arguments to the bean invocation
 beanInvocation.setArgs(args);

 // Set the bean invocation object as the message body
 exchange.getIn().setBody(beanInvocation);
}

P.S: I am new to camel and trying to understand the concepts.





Aucun commentaire:

Enregistrer un commentaire