Mule ESB Component配置摘要

1.组件简介

Service components contain the business logic for working with the messages passed through Mule ESB. A service component can be any type
of object, including a Spring bean, POJO, script, web service, or REST call.

Because they are highly specific to your implementation, you will typically create your own custom components, or simply use an existing POJO
(由于它们是一种非常特殊的组件,所以你可能去自定义,或者使用一个已经存在的pojo)

Mule also ships with some standard components you can use or extend as needed. (Mule 也提供了一些按照你的需要去使用或拓展的组件).

2.组件分类介绍

(1) Simple Components

There are several simple components included with Mule that are useful for testing or bypassing component execution

这些组件有 <log-component/> <echo-component/> <null-component/> <passthrough-component>  <bridge-component/>  <test:component/>

(2) Java Components

Java components can be configured quickly and easily by simply specifying the service component implementation class name on the
<component> or <pooled-component> element. The <pooled-component> element allows you to establish a pooling profile for the service
(see Tuning Performance). In both cases, the PrototypeObjectFactory will be used by default and a new object instance will be created for
each request or (for pooled components) for each new object in the pool
.

<component class="org.my.ServiceComponentImpl"/>
...
<pooled-component class="org.my.ServiceComponentImpl"/>
Alternatively, you can explicitly specify object factories, such as the SingletonObjectFactory that creates a single instance of the object:

<component>
<singleton-object class="org.my.ServiceComponentImpl"/>
</component>

        (3). Other Components

Thereare several other components available that allow you to use different technologies such as web services for your service components.

        这些组件有 <http:rest-service-component/>   <cxf:wrapper-component/> <script:component/> 

(4).Lifecycle 生命周期

Components have a lifecycle like any other object in the Mule registry. Lifecycle can be configured by adding one or more lifecycle interfaces to
your component. Since Mule 3.0 JSR-250 annotations can be used to configure initialise and destroy methods. The following list describes in
order the lifecycle phases for component objects.

这些接口有 initialise start stop dispose 

3.Java Component z组件的配置

...先留着...




  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值