mule简介

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Mule是一个企业服务总线(ESB)消息框架,而且Mule是一个轻量级且高度可扩展的ESB。

主要特性
1.基于J2EE1.4的企业消息总线(ESB)和消息代理(broker).
2.可插入的连接性:比如Jms,jdbc,tcp,udp,multicast,http,servlet,smt
3.支持任何传输之上的异步,同步和请求响应事件处理机制.
4.支持Axis或者Glue的Web Service.
5.灵活的部署结构[Topologies]包括Client/Server, P2P, ESB 和Enterp
6.与Spring 框架集成:可用作ESB 容器,也可以很容易的嵌入到Spring应
7.使用基于SEDA处理模型的高度可伸缩的企业服务器.
8.强大的基于EIP模式的事件路由机制等.
9.支持声明性和编程性事务,包括XA 支持
10.对事件的路由、传输和转换的断到端支持
11.使用基于SEDA处理模型的高度可伸缩的企业服务器
12.支持REST API 来提供技术独立和语言中立的基于web的对Mule 事件的
13.动态、声明性的,基于内容和基于规则的路由选项
14.非入侵式的方式。

任何对象都可以通过ESB 容器管理
15.强大的应用集成框架
16.完整的可扩展的开发模式
更详细的介绍:
/SteelHand/archive/2005/05/18/47 mule2.0发布的中文说明:
/java/20080429/7664.html
Mule 2.x User Guide
/display/MULE2USER/Home
架构
一些名词说明
Transport Mule的传输层,由很多组件构成
Connector连接器,负责发送和接
Endpoints端点,发送和接收消息
2.0版本以后端点的配
Transformer转换器,负责接收和发
Router路由器,在Connector
Filter过滤器,对接收和发送UMO Components业务组件,这部分代码
Inbound/Outbound消息入口、出口其他
Mule作为Java Application
Mule作为Web Application
Mule作为ESB(Enterprise Service Network )
Mule作为ESN(Enterprise Service Network )
Mule Messaging Styles Mule的消息机制Asynchronous异步
Request Response请求响应Synchronous同步
Remote Synchronous远程同步Async Request Response
mule-2.0.1中hello例子的配置文件
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="/schema/mule/core/2.0"
xmlns:xsi="/2001/XMLSchema-instance"
xmlns:spring="/schema/beans"
xmlns:stdio="/schema/mule/stdio/2.0"
xmlns:vm="/schema/mule/vm/2.0"
xsi:schemaLocation="
/schema/beans /s /schema/mule/core/2.0 /sch /schema/mule/stdio/2.0 /sc /schema/mule/vm/2.0 /schem <description>
The hello sample application has two components -
1. The Greeter component that adds a greeting to the event it receives
2. The ChitChater component that adds some additional conversation to the event it rece An event is triggered by input through the system console and the outbound event is
aslo written out through the system console.
This configuration also demonstrates user and system error handling. User error handlin an error message to the end user. System error handling logs errors.
</description>
<!--
The system stream connector is used to send and receive information via the
System.in and System.out. Note this connector is only really useful for testing
purposes.
promptMessage - is what is written to the console
<outbound-pass-through-router>
<stdio:outbound-endpoint system="ERR"/> </outbound-pass-through-router>
</outbound>
</service>
</model>
</mule>
可扩展的ESB。

st,http,servlet,smtp,pop3, file,xmpp等. , P2P, ESB 和Enterprise Service Network.容易的嵌入到Spring应用中.
于web的对Mule 事件的访问
chive/2005/05/18/4737.html
输层,由很多组件构成:Connector、Endpoints、Transformer等等,他们一起协同完成消息的传递工作。

连接器,负责发送和接收各种消息,各种不同的协议有不同的连接器,如:HTTP,POP3,soap等。

通常连接器有三端点,发送和接收消息的地址,一般会由协议和地址组成,类似这样:pop3://user:password@,前面2.0版本以后端点的配置方式发生变化,协议和地址分开了,不过还是可以按照这种方式理解。

转换器,负责接收和发送的消息的格式转换,比如:ByteArrayToString transformer作用就是把字节数组转换成字路由器,在Connector发送或接收消息之前,对消息进行一些处理,比如:
outbound-pass-through-router
filtering-router
过滤器,对接收和发送的消息进行过滤,不符合规则的不让通过,只有满足过滤器的要求,消息才能通过。

过滤器FilenameWildcardFilter对文件名进行过滤
业务组件,这部分代码和mule可以没有任何关系,他可以是一些简单的javaBean,处理业务上面的事情,也可以什消息入口、出口
/display/MULE2INTRO/Embedding+Mule+in+a+Java+Applica
/display/MULE2INTRO/Embedding+Mule+in+a+Webapp
Mule的消息机制
Mule的消息机制
异步的请求响应
Hello-config分析/schema/beans/spring-beans-2.0.xsd
/schema/mule/core/2.0/mule.xsd
/schema/mule/stdio/2.0/mule-stdio.xsd /schema/mule/vm/2.0/mule-vm.xsd">
o the event it receives
tbound event is
User error handling returns
ion via the
ful for testing
的传递工作。

p等。

通常连接器有三种类型:只用于接收,只用于发送和两者皆可。

d@,前面为协议后面为协议能解析的地址,
是把字节数组转换成字符串
直接让消息通过的路由器
带过滤器的路由器
消息才能通过。

过滤器和路由器结合使用。

上面的事情,也可以什么都不干,直接让消息通过。

e+in+a+Java+Application
e+in+a+Webapp
/display/MULE2INTRO/LoanBroker+ESB
/display/MULE2INTRO/Loan+Broker+Example。

相关文档
最新文档