Camel - Bean: Look up bean and invoke

Camel - Bean: Look up bean and invoke

Camel acts as a service activator using the bean component, which sits between the caller and the bean. At compile time, there are no direct bindings, and the JVM can’t link the caller to the bean; Camel must resolve this at runtime.

Figure below shows how the bean component uses the registry to look up the bean to invoke.
在这里插入图片描述
At runtime, a Camel exchange is routed, and at a given point in the route, it reaches the bean component. The bean component (BeanProcessor) then processes the exchange, performing these general steps:

  1. Looks up the bean in the registry
  2. Selects the method to invoke on the bean
  3. Binds to the parameters of the selected method (for example, using the body of the input message as a parameter)
  4. Invokes the method
  5. Handles any invocation errors that occur (any exceptions thrown from the bean will be set on the Camel exchange for further error handling)
  6. Sets the method’s reply (if there is one) as the body on the output message on the Camel exchange
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值