Beruflich Dokumente
Kultur Dokumente
Mule
UC San Diego
CSE 294
November 14, 2008
Barry Demchak
Agenda
What is an ESB?
Java Business Integration (JBI)
Mule Architecture
Mule in the Real World
Source Material
[Ric] Mark Richards, “The Role of the
Enterprise Service Bus”, NFJS, Oct 23,
2006. http://www.infoq.com/presentations/Enterprise-Service-Bus
[Mul] Mule Architecture Guide.
http://mule.mulesource.org/display/MULE/Architecture+Guide
Gartner Group
o m
r . c
w e
apo
a t
d
w.
ww
[Ric]
ESB Features
[Ric]
An ESB Blueprint
General case
vs
[Ric]
Java Business Integration (JBI)
JSR-208 Standard
Defines service engines (SE – choreographers,
transformers, security, etc) and binding components
(BC – xml, http, etc)
Concerned with how internal customers (not external
services) interact with service providers
COTS
[Ric]
JBI Example
Service Mix
Binding Components
Service Engines
[Ric]
Mule Architecture
[Mule]
Mule Flow View
[Mule]
Mule Programming Model
Application logic
Application glue
Mule glue
[Mule]
Mule Routers
[Mule]
Selective Consumer (inbound)
Applies one or more filters to incoming payload, then
branch based on filter
<inbound-router>
<catch-all-strategy
className="org.mule.routing.ForwardingCatchAllStrategy">
<endpoint address="jms://topic:error.topic"/>
</catch-all-strategy>
<router
className="org.mule.routing.inbound.SelectiveConsumer">
<filter expression="msg/header/resultcode = 'success'"
className="org.mule.routing.filters.xml.JXPathFilter"/
>
</router>
</inbound-router>
Filtering Outbound (outbound)
<outbound-router>
<catch-all-strategy
className="org.mule.routing.ForwardingCatchAllStrategy">
<endpoint="jms://error.queue"/>
</catch-all-strategy>
<router className="org.mule.routing.outbound.FilteringOutboundRouter">
<endpoint address="smtp://ross@muleumo.org"/>
<filter expectedType="java.lang.Exception"
className="org.mule.routing.filters.PayloadTypeFilter"/>
</router>
<router className="org.mule.routing.outbound.FilteringOutboundRouter">
<endpoint address="jms://string.queue"/>
<filter className="org.mule.routing.filters.logic.AndFilter">
<left-filter expectedType="java.lang.String"
className="org.mule.routing.filters.PayloadTypeFilter"/>
<right-filter pattern="the quick brown (.*)"
className="org.mule.routing.filters.RegExFilter"/>
</filter>
</router>
</outbound-router>
Nested Router
Allows synchronous callouts that can be intercepted and routed
<mule-descriptor name="InvokerComponent"
implementation="org.mule.foo.Invoker">
<inbound-router>
<endpoint address="jms://Invoker.in"/>
</inbound-router>
<nested-router>
<binding interface="org.mule.foo.HelloInterface">
<endpoint
address="axis:http://192.168.2.14:81/services/HelloWebComponen
t?method=helloMethod" remoteSync="true"/>
</binding>
</nested-router>
<outbound-router>
<router
className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint address="jms://Invoker.out"/>
</router>
</outbound-router>
</mule-descriptor>
Dog Days with Mule
September [mule-user archive]
How to get a hold of Endpoint object from the
component? {mule}
Failed to throw UserDefined Exception {jaxws}
Failed to invoke lifecycle “start” using CXF in
JBOSS {cxf}
Problem in loading xsd files {mule}
Problems with RemoteDispatcher {mule}
Inject MuleClient Singleton with Spring {mule}
Mule transaction support {mule}
ESB Features
√ Routing
√ Message Processing
√ Message Transformation
Process Choreography
X
√ Message Enhancement
Service Orchestration
X
√ Protocol Transformation
Transaction Management
Service Mapping Security
Take Away Messages
Mule’s generality results in great flexibility, but at the
cost of great complexity for users