2

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.

Esh
  • 836
  • 5
  • 16
  • 43

1 Answers1

0

Yes it is deprecated. I can not belive there is no any answer.

Here is the guide for it. - there is not only th BeanInvocation is deprecated so I recommend using all new methods to your project.

https://camel.apache.org/manual/latest/camel-3-migration-guide.html - Read this guide by apache. (There is no any said that is the alternative for BeanInvocation. You must create a alternative. it just removed. It means use the reccomend methods. Not old ones.)

DSF.Inc
  • 3,021
  • 2
  • 6
  • 9