SlideShare a Scribd company logo
1 of 40
Copyright 2006-2009 Dan 1
M
D
The Enterprise Service Bus
Introduction using Mule
Introduction to Open-Source ESB
Authors: Dan McCreary and Arun Batchu
Date: 11/20/2006
Version: DRAFT 0.2
Copyright 2006-2009 Dan 2
M
D
Agenda
• What is Mule?
• How do you use Mule?
• What are the core Mule concepts?
• Learning mule with File endpoints
Copyright 2006-2009 Dan 3
M
D
Enterprise Service Backbone
• Mule is an open-source Enterprise Service
Backbone (ESB)
Copyright 2006-2009 Dan 4
M
D
Mule is Has Advanced
Technologies
• SEDA
– Staged Event-Driven Architecture
• Java NIO
– Java New Input/Output
Copyright 2006-2009 Dan 5
M
D
SEDA
• SEDA decomposes a complex, event-driven software application into a set
of stages connected by queues
• This design avoids the high overhead associated with thread-based
concurrency models, and decouples event and thread scheduling from
application logic
• By performing admission control on each event queue, the service can be
well-conditioned to load, preventing resources from being overcommitted
when demand exceeds service capacity
• SEDA employs dynamic control to automatically tune runtime parameters
(such as the scheduling parameters of each stage) as well as to manage
load, for example, by performing adaptive load shedding
• Decomposing services into a set of stages also enables modularity and code
reuse, as well as the development of debugging tools for complex event-
driven applications
Copyright 2006-2009 Dan 6
M
D
Java NIO
• NIO is a collection of Java programming language APIs
that offer advanced features for intensive I/O operations
• NIO facilitates an implementations that can directly use
the most efficient operations of the underlying platform
• NIO includes:
– Buffers for data of primitive types
– Character set encoders and decoders
– A pattern-matching facility based on Perl-style regular expressions
(in package java.util.regex)
– Channels, a new primitive I/O abstraction
– A file interface that supports locks and memory mapping
– A multiplexed, non-blocking I/O facility for writing scalable
servers
Copyright 2006-2009 Dan 7
M
D
Mule’s “Moves Things Around”
• Folder to folder
• Queue to queue
• Shared memory to shared memory
• Using different types of transports
• In a flexible way
Copyright 2006-2009 Dan 8
M
D
XML Pipeline
• An XML pipeline is a series of operation
that are performed on one or more XML
files
• Examples include:
– validate
– transform
– prune (remove nodes)
– split (break a single XML file into many files)
– merge (join two or more files together)
Copyright 2006-2009 Dan 9
M
D
CRV Example
• Flow of XML document through approval
processes
Submit
CRV
Deed
Matched
CRV
SSN
Stripped
CRV
Income
Tax
Audit
County
Audit
County
Approval
State
Audit
State
Approval
Copyright 2006-2009 Dan 10
M
D
Decomposition
• Example of XML Operations used on CRV
Validate Split
Remove
SSN
Element
Store
Modify
Value
Add
Element
Modify
Value
Add
Element
Copyright 2006-2009 Dan 11
M
D
Declarative Approach
• Focus on specifying "What" not "How"
• Empower business analysis to write
machine-readable specifications
• Hide the "How" behind services with clear
interfaces (SOA)
Copyright 2006-2009 Dan 12
M
D
Core Mule Concepts
• Mule Manager
• Mule Model
• Universal Message Object (UMO)
• Endpoints
• External Applications
Copyright 2006-2009 Dan 13
M
D
Universal Message Object (UMO)
• A UMO is a type of Java object that can
– receive events "from anywhere"
– send events
• UMO Components are usually your business
objects. They are components that execute
business logic on an incoming event
• UMO are standard JavaBeans (containers)
• There is no Mule-specific code in your
components
• Mule handles all routing and transformation of
events to and from your objects based on the
configuration of your component
Copyright 2006-2009 Dan 14
M
D
Transport
• A transport or "provider", is a set of objects
that add support to Mule to handle a
specific kind of transport or protocol
• Examples
– the "Email Provider" enables Mule to send and
receive messages via the SMTP, POP and
IMAP protocols
Copyright 2006-2009 Dan 15
M
D
Connector
• A connector is the object that sends and
receives messages on behalf of an endpoint.
• Connectors are bundled as part of specific
transports or providers.
• For example, the FileConnector can
read and write file system files.
Copyright 2006-2009 Dan 16
M
D
Router
• A router is the object that do something
with messages once they have been
received by a connector, or prior to being
sent out by the connector
Copyright 2006-2009 Dan 17
M
D
Filter
• A filter optionally filters incoming or outgoing
messages that are coming into or going out from a
connector.
• For example, the File Provider comes with a
FilenameWildcardFilter that restricts
which files are read by the connector based on file
name patterns. For example only files with the
.xml extension can be routed.
• Filters are used in conjunction with Routers.
Copyright 2006-2009 Dan 18
M
D
Transformer
• A transformer optionally changes incoming
or outgoing messages in some way
• This is usually done to make the message
format useable by a downstream function
• Examples:
– the ByteArrayToString transformer converts
byte arrays into String objects.
Copyright 2006-2009 Dan 19
M
D
Mule Event Flow
• The nine stages of a
mule event
– first 2 – inbound
– middle 4 –
component
– last 2 – outbound
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Inbound
Component
Outbound
Optional Step
Copyright 2006-2009 Dan 20
M
D
Message Receiver Endpoint
• Some event triggers a
message flow
– A file being written into a
folder
– A message arriving on a
message queue
– A record in a database
– Data written to a socket
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Endpoint
(Message Receiver)
Copyright 2006-2009 Dan 21
M
D
Inbound Router
• The inbound router is the fist step in a
message. Functions typically
performed by an inbound router
– Filtering
– Remove duplicate messages
– Matching messages
– Aggregation (combining)
– Re-sequence data
– Forwarding
• See also
– IdempotentReceiver
– CorrolationAggregator
– CorrelationResequencer
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Endpoint
(Message Receiver)
Copyright 2006-2009 Dan 22
M
D
Interceptor
• Used to intercept message flow
into your service component
• Used trigger monitor/events or
interrupt the flow of the message
• Example: an authorization
interceptor could ensure that the
current request has the correct
credentials to invoke the service.
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Service Invocation
Interceptor
Endpoint
(Message Receiver)
Interceptor
Copyright 2006-2009 Dan 23
M
D
Inbound Transformer
• If the inbound data is
not in the correct
format for the
service it must be
transformed at this
point
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Inbound Transformer
Copyright 2006-2009 Dan 24
M
D
Service Invocation
• The actual service is
performed
• In mule, this is generally a
Java object
• Service invocation can also
be a "pass through"
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Outbound Transformer
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Copyright 2006-2009 Dan 25
M
D
Outbound Router
• Dispatching the data
to all the relevant
endpoints
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Transformer
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Outbound Router
Copyright 2006-2009 Dan 26
M
D
Built-in Router Classes
Inbound Outbound Response
Idempotent Receiver Filtering Outbound Router Response Aggregator
Selective Consumer Recipient List
Aggregator Multicasting Router
Resequencer Chaining Router
Forwarding Consumer Message Splitter
Filtering List Message
Splitter
Filtering Xml Message
Splitter
Exception Based Router
Copyright 2006-2009 Dan 27
M
D
Outbound Transformer
• Any transformations that needs to be
done on the message after a service
has been performed on the message
can be executed before it is put into
the endpoint
• See Also
– EnvelopeInterceptor
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Outbound Router
Outbound Transformer
Copyright 2006-2009 Dan 28
M
D
Test Environment
Copyright 2006-2009 Dan 29
M
D
Omitted From Examples for Brevity
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mule-configuration PUBLIC "-//MuleSource
//DTD mule-configuration XML V1.0//EN"
"http://mule.mulesource.org/dtds/mule-
configuration.dtd">
Copyright 2006-2009 Dan 30
M
D
Outline of Move All Files
<mule-configuration>
<model>
<mule-descriptor>
<inbound-router>
<endpoint
address="file:///c:/mule-class/in"/>
</inbound-router>
<outbound-router>
<router>
<endpoint
address="file:///c:/mule-class/out"/>
</router>
</outbound-router>
</mule-descriptor>
</model>
</mule-configuration>
Copyright 2006-2009 Dan 31
M
D
Move All Files – Procedural
Details
<mule-configuration id="Mule_File_Move" version=" 1.0">
<connector name="SystemStreamConnector"
className="org.mule.providers.stream.SystemStreamConnector"
/>
<model name="move-all-files">
<mule-descriptor name="move-file"
implementation="org.mule.components.simple.BridgeComponent"
>
<inbound-router>
<endpoint address="file:///c:/tmp/in"/>
</inbound-router>
<outbound-router>
<router
className="org.mule.routing.outbound.OutboundPassThroughRou
ter">
<endpoint address="file:///c:/tmp/out"/>
</router>
</outbound-router>
</mule-descriptor>
</model>
</mule-configuration>
Copyright 2006-2009 Dan 32
M
D
Only Moving XML Files
<inbound-router>
<endpoint address="file:///c:/mule-class/in">
<filter pattern="*.xml"
className=
"org.mule.providers.file.filters.FilenameWildcardFilter"/>
</endpoint>
</inbound-router>
Add the filter line to only move files with the extension
"*.xml". If you add a file "foobar.txt to the input folder it
will not be moved.
Copyright 2006-2009 Dan 33
M
D
Keeping the Name The Same
<outbound-router>
<router
className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint
address=
"file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"
/>
</router>
</outbound-router>
Add the outputPattern parameter to keep the output
name the same as the input.
Copyright 2006-2009 Dan 34
M
D
Happy Path and Exceptions
• By default, error free documents follow a central path known as
the "happy path"
• Documents that have errors may be handled in different ways
(rejected, warnings etc.)
Start StopStep 1 Step 2 Step 3
Stop Stop Stop
Copyright 2006-2009 Dan 35
M
D
Exception Handling
• Mule has a special way of handling non-happy path processing. This
is called an "Exception Strategy" but is it really just and exception
path and there is very little strategy involved.
• There are three places you can associate an exception strategy
– connector
– component
– model (set for all components in a model)
Copyright 2006-2009 Dan 36
M
D
Exception Strategy
<exception-strategy
className=org.mule.impl.DefaultComponentExceptionStrategy">
<endpoint address="file:///c:/mule-class/error"/>
</exception-strategy>
We want all invalid documents to be moved into the
error folder.
Copyright 2006-2009 Dan 37
M
D
Sample XML
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<Element1>Hello World!</Element1>
<Element2>String</Element2>
<Element3>String</Element3>
<DansInvalidDataElement>This is Dans invalid data element</DansInvalidDataElement>
</Data>
XML Schema validation will generate an error message
when it gets to the fourth invalid data element:
Given the following XML Schema file:
Copyright 2006-2009 Dan 38
M
D
Validating against an XML Schema
<outbound-router>
<router className="org.mule.routing.outbound.FilteringXmlMessageSplitter">
<endpoint
address="file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"/>
<properties>
<property name="validateSchema" value="true"/>
<property name="externalSchemaLocation"
value="file:///c:/mule-class/labs/07-validate/my-
schema.xsd"/>
</properties>
</router>
</outbound-router>
To validate the XML Schema, just add two properties:
1) tell it to validate the document
2) tell it what file to use and where to find it
Copyright 2006-2009 Dan 39
M
D
Error Message
document : cvc-complex-type.2.4.d: Invalid content was found
starting with element 'DansInvalidDataElement'. No child
element is expected at this point.
This error message is generated on the Mule console
when an invalid data element is found. But what should
we do with it? How do we redirect it to the appropriate
user?
Copyright 2006-2009 Dan 40
M
D
Thank You!
Please contact me for more information:
• Enterprise Service Bus
• Enterprise Integration
• Metadata Management
• Metadata Registries
• Service Oriented Architectures
• Business Intelligence and Data Warehouse
• Semantic Web
Dan McCreary, President
Dan McCreary & Associates
Metadata Strategy Development
dan@danmccreary.com
(952) 931-9198

More Related Content

What's hot

Mule overview
Mule overviewMule overview
Mule overviewF K
 
Enterprise Integration Patterns
Enterprise Integration PatternsEnterprise Integration Patterns
Enterprise Integration PatternsOleg Tsal-Tsalko
 
Dcnintroduction 141010054657-conversion-gate01
Dcnintroduction 141010054657-conversion-gate01Dcnintroduction 141010054657-conversion-gate01
Dcnintroduction 141010054657-conversion-gate01yibeltal yideg
 
WSDL in Mule Esb
WSDL in Mule EsbWSDL in Mule Esb
WSDL in Mule EsbAnand kalla
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS TransportRupesh Sinha
 
JUDCon2014-ScalableMessagingWithJBossA-MQ and Apache Camel
JUDCon2014-ScalableMessagingWithJBossA-MQ and Apache CamelJUDCon2014-ScalableMessagingWithJBossA-MQ and Apache Camel
JUDCon2014-ScalableMessagingWithJBossA-MQ and Apache CamelNaveen Raj Balasubramaniam
 
Acceleration Technology: Solving File Transfer Issues
Acceleration Technology: Solving File Transfer IssuesAcceleration Technology: Solving File Transfer Issues
Acceleration Technology: Solving File Transfer IssuesFileCatalyst
 
WSO2 ESB Introduction to Inbound Endpoints
WSO2 ESB Introduction to Inbound EndpointsWSO2 ESB Introduction to Inbound Endpoints
WSO2 ESB Introduction to Inbound EndpointsIsuru Udana
 
Tv and video on the Internet
Tv and video on the InternetTv and video on the Internet
Tv and video on the InternetDivante
 
Edge 2014: MPEG DASH – Tomorrow's Format Today
Edge 2014: MPEG DASH – Tomorrow's Format TodayEdge 2014: MPEG DASH – Tomorrow's Format Today
Edge 2014: MPEG DASH – Tomorrow's Format TodayAkamai Technologies
 
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013Microsoft Décideurs IT
 
04.m3 cms streaming-protocol
04.m3 cms streaming-protocol04.m3 cms streaming-protocol
04.m3 cms streaming-protocoltarensi
 
QLogic Solutions - Microsoft Exchange Server
QLogic Solutions - Microsoft Exchange ServerQLogic Solutions - Microsoft Exchange Server
QLogic Solutions - Microsoft Exchange ServerQLogic Corporation
 
Differentiated services - Advance Routing
Differentiated services - Advance RoutingDifferentiated services - Advance Routing
Differentiated services - Advance RoutingPradnya Saval
 

What's hot (20)

Mule overview
Mule overviewMule overview
Mule overview
 
Enterprise Integration Patterns
Enterprise Integration PatternsEnterprise Integration Patterns
Enterprise Integration Patterns
 
Dcnintroduction 141010054657-conversion-gate01
Dcnintroduction 141010054657-conversion-gate01Dcnintroduction 141010054657-conversion-gate01
Dcnintroduction 141010054657-conversion-gate01
 
WSDL in Mule Esb
WSDL in Mule EsbWSDL in Mule Esb
WSDL in Mule Esb
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS Transport
 
Thrift
ThriftThrift
Thrift
 
Clustering & nlb
Clustering & nlbClustering & nlb
Clustering & nlb
 
JUDCon2014-ScalableMessagingWithJBossA-MQ and Apache Camel
JUDCon2014-ScalableMessagingWithJBossA-MQ and Apache CamelJUDCon2014-ScalableMessagingWithJBossA-MQ and Apache Camel
JUDCon2014-ScalableMessagingWithJBossA-MQ and Apache Camel
 
Mule overview
Mule overviewMule overview
Mule overview
 
Acceleration Technology: Solving File Transfer Issues
Acceleration Technology: Solving File Transfer IssuesAcceleration Technology: Solving File Transfer Issues
Acceleration Technology: Solving File Transfer Issues
 
WSO2 ESB Introduction to Inbound Endpoints
WSO2 ESB Introduction to Inbound EndpointsWSO2 ESB Introduction to Inbound Endpoints
WSO2 ESB Introduction to Inbound Endpoints
 
Tv and video on the Internet
Tv and video on the InternetTv and video on the Internet
Tv and video on the Internet
 
Edge 2014: MPEG DASH – Tomorrow's Format Today
Edge 2014: MPEG DASH – Tomorrow's Format TodayEdge 2014: MPEG DASH – Tomorrow's Format Today
Edge 2014: MPEG DASH – Tomorrow's Format Today
 
CCNA part 1 osi
CCNA part 1 osiCCNA part 1 osi
CCNA part 1 osi
 
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
 
04.m3 cms streaming-protocol
04.m3 cms streaming-protocol04.m3 cms streaming-protocol
04.m3 cms streaming-protocol
 
QLogic Solutions - Microsoft Exchange Server
QLogic Solutions - Microsoft Exchange ServerQLogic Solutions - Microsoft Exchange Server
QLogic Solutions - Microsoft Exchange Server
 
Mule rabbitmq
Mule rabbitmqMule rabbitmq
Mule rabbitmq
 
Differentiated services - Advance Routing
Differentiated services - Advance RoutingDifferentiated services - Advance Routing
Differentiated services - Advance Routing
 
Load balancing
Load balancingLoad balancing
Load balancing
 

Viewers also liked

Viewers also liked (6)

Discordância
Discordância Discordância
Discordância
 
3 discordancias e deformacao
3  discordancias e deformacao3  discordancias e deformacao
3 discordancias e deformacao
 
Grupo Discordâncias e deformação plástica
Grupo Discordâncias e deformação plásticaGrupo Discordâncias e deformação plástica
Grupo Discordâncias e deformação plástica
 
Estampagem
EstampagemEstampagem
Estampagem
 
Conformação mecânica
Conformação mecânicaConformação mecânica
Conformação mecânica
 
Estampagem
EstampagemEstampagem
Estampagem
 

Similar to Mule overview

Overview of Mule
Overview of MuleOverview of Mule
Overview of Mulemdfkhan625
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using MuleKhasim Cise
 
An introduction to Apache Camel
An introduction to Apache CamelAn introduction to Apache Camel
An introduction to Apache CamelKapil Kumar
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2
 
complete web service1.ppt
complete web service1.pptcomplete web service1.ppt
complete web service1.pptDr.Saranya K.G
 
Introduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah HazratIntroduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah HazratAttaullah Hazrat
 
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...Amazon Web Services
 

Similar to Mule overview (20)

mule-overview.ppt
mule-overview.pptmule-overview.ppt
mule-overview.ppt
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mule Overview
Mule OverviewMule Overview
Mule Overview
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
Mule
MuleMule
Mule
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mule overview-ppt
Mule overview-pptMule overview-ppt
Mule overview-ppt
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mulesoftppt
Mulesoftppt Mulesoftppt
Mulesoftppt
 
Mule overview
Mule overviewMule overview
Mule overview
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using Mule
 
An introduction to Apache Camel
An introduction to Apache CamelAn introduction to Apache Camel
An introduction to Apache Camel
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
 
complete web service1.ppt
complete web service1.pptcomplete web service1.ppt
complete web service1.ppt
 
Introduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah HazratIntroduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah Hazrat
 
Web service architecture
Web service architectureWeb service architecture
Web service architecture
 
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
 

More from ppts123456

Anypointconnectordevkit 160816041722
Anypointconnectordevkit 160816041722Anypointconnectordevkit 160816041722
Anypointconnectordevkit 160816041722ppts123456
 
Muleesbcomponents1 160625154208
Muleesbcomponents1 160625154208Muleesbcomponents1 160625154208
Muleesbcomponents1 160625154208ppts123456
 
Flowsinmule 160517130818
Flowsinmule 160517130818Flowsinmule 160517130818
Flowsinmule 160517130818ppts123456
 
Mulefundamentals 160503050909
Mulefundamentals 160503050909Mulefundamentals 160503050909
Mulefundamentals 160503050909ppts123456
 
4 150915033746-lva1-app6892
4 150915033746-lva1-app68924 150915033746-lva1-app6892
4 150915033746-lva1-app6892ppts123456
 
Mulehdfsconnector 160810122655
Mulehdfsconnector 160810122655Mulehdfsconnector 160810122655
Mulehdfsconnector 160810122655ppts123456
 
Mulethenewtechnology 12549172699166-phpapp03-160421133841
Mulethenewtechnology 12549172699166-phpapp03-160421133841Mulethenewtechnology 12549172699166-phpapp03-160421133841
Mulethenewtechnology 12549172699166-phpapp03-160421133841ppts123456
 
Deployingmuleapplications 160903085602
Deployingmuleapplications 160903085602Deployingmuleapplications 160903085602
Deployingmuleapplications 160903085602ppts123456
 
Mulesoftanypointplatformintro
MulesoftanypointplatformintroMulesoftanypointplatformintro
Mulesoftanypointplatformintroppts123456
 
2016 08-08 ecology and environment
2016 08-08 ecology and environment2016 08-08 ecology and environment
2016 08-08 ecology and environmentppts123456
 
Algorithm analysis and efficiency
Algorithm analysis and efficiencyAlgorithm analysis and efficiency
Algorithm analysis and efficiencyppts123456
 

More from ppts123456 (13)

Anypointconnectordevkit 160816041722
Anypointconnectordevkit 160816041722Anypointconnectordevkit 160816041722
Anypointconnectordevkit 160816041722
 
Muleesbcomponents1 160625154208
Muleesbcomponents1 160625154208Muleesbcomponents1 160625154208
Muleesbcomponents1 160625154208
 
Flowsinmule 160517130818
Flowsinmule 160517130818Flowsinmule 160517130818
Flowsinmule 160517130818
 
Mulefundamentals 160503050909
Mulefundamentals 160503050909Mulefundamentals 160503050909
Mulefundamentals 160503050909
 
4 150915033746-lva1-app6892
4 150915033746-lva1-app68924 150915033746-lva1-app6892
4 150915033746-lva1-app6892
 
Mulehdfsconnector 160810122655
Mulehdfsconnector 160810122655Mulehdfsconnector 160810122655
Mulehdfsconnector 160810122655
 
Mulethenewtechnology 12549172699166-phpapp03-160421133841
Mulethenewtechnology 12549172699166-phpapp03-160421133841Mulethenewtechnology 12549172699166-phpapp03-160421133841
Mulethenewtechnology 12549172699166-phpapp03-160421133841
 
Deployingmuleapplications 160903085602
Deployingmuleapplications 160903085602Deployingmuleapplications 160903085602
Deployingmuleapplications 160903085602
 
Mulesoftanypointplatformintro
MulesoftanypointplatformintroMulesoftanypointplatformintro
Mulesoftanypointplatformintro
 
Wsdl
WsdlWsdl
Wsdl
 
2016 08-08 ecology and environment
2016 08-08 ecology and environment2016 08-08 ecology and environment
2016 08-08 ecology and environment
 
Algorithm analysis and efficiency
Algorithm analysis and efficiencyAlgorithm analysis and efficiency
Algorithm analysis and efficiency
 
E procureppt
E procurepptE procureppt
E procureppt
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 

Mule overview

  • 1. Copyright 2006-2009 Dan 1 M D The Enterprise Service Bus Introduction using Mule Introduction to Open-Source ESB Authors: Dan McCreary and Arun Batchu Date: 11/20/2006 Version: DRAFT 0.2
  • 2. Copyright 2006-2009 Dan 2 M D Agenda • What is Mule? • How do you use Mule? • What are the core Mule concepts? • Learning mule with File endpoints
  • 3. Copyright 2006-2009 Dan 3 M D Enterprise Service Backbone • Mule is an open-source Enterprise Service Backbone (ESB)
  • 4. Copyright 2006-2009 Dan 4 M D Mule is Has Advanced Technologies • SEDA – Staged Event-Driven Architecture • Java NIO – Java New Input/Output
  • 5. Copyright 2006-2009 Dan 5 M D SEDA • SEDA decomposes a complex, event-driven software application into a set of stages connected by queues • This design avoids the high overhead associated with thread-based concurrency models, and decouples event and thread scheduling from application logic • By performing admission control on each event queue, the service can be well-conditioned to load, preventing resources from being overcommitted when demand exceeds service capacity • SEDA employs dynamic control to automatically tune runtime parameters (such as the scheduling parameters of each stage) as well as to manage load, for example, by performing adaptive load shedding • Decomposing services into a set of stages also enables modularity and code reuse, as well as the development of debugging tools for complex event- driven applications
  • 6. Copyright 2006-2009 Dan 6 M D Java NIO • NIO is a collection of Java programming language APIs that offer advanced features for intensive I/O operations • NIO facilitates an implementations that can directly use the most efficient operations of the underlying platform • NIO includes: – Buffers for data of primitive types – Character set encoders and decoders – A pattern-matching facility based on Perl-style regular expressions (in package java.util.regex) – Channels, a new primitive I/O abstraction – A file interface that supports locks and memory mapping – A multiplexed, non-blocking I/O facility for writing scalable servers
  • 7. Copyright 2006-2009 Dan 7 M D Mule’s “Moves Things Around” • Folder to folder • Queue to queue • Shared memory to shared memory • Using different types of transports • In a flexible way
  • 8. Copyright 2006-2009 Dan 8 M D XML Pipeline • An XML pipeline is a series of operation that are performed on one or more XML files • Examples include: – validate – transform – prune (remove nodes) – split (break a single XML file into many files) – merge (join two or more files together)
  • 9. Copyright 2006-2009 Dan 9 M D CRV Example • Flow of XML document through approval processes Submit CRV Deed Matched CRV SSN Stripped CRV Income Tax Audit County Audit County Approval State Audit State Approval
  • 10. Copyright 2006-2009 Dan 10 M D Decomposition • Example of XML Operations used on CRV Validate Split Remove SSN Element Store Modify Value Add Element Modify Value Add Element
  • 11. Copyright 2006-2009 Dan 11 M D Declarative Approach • Focus on specifying "What" not "How" • Empower business analysis to write machine-readable specifications • Hide the "How" behind services with clear interfaces (SOA)
  • 12. Copyright 2006-2009 Dan 12 M D Core Mule Concepts • Mule Manager • Mule Model • Universal Message Object (UMO) • Endpoints • External Applications
  • 13. Copyright 2006-2009 Dan 13 M D Universal Message Object (UMO) • A UMO is a type of Java object that can – receive events "from anywhere" – send events • UMO Components are usually your business objects. They are components that execute business logic on an incoming event • UMO are standard JavaBeans (containers) • There is no Mule-specific code in your components • Mule handles all routing and transformation of events to and from your objects based on the configuration of your component
  • 14. Copyright 2006-2009 Dan 14 M D Transport • A transport or "provider", is a set of objects that add support to Mule to handle a specific kind of transport or protocol • Examples – the "Email Provider" enables Mule to send and receive messages via the SMTP, POP and IMAP protocols
  • 15. Copyright 2006-2009 Dan 15 M D Connector • A connector is the object that sends and receives messages on behalf of an endpoint. • Connectors are bundled as part of specific transports or providers. • For example, the FileConnector can read and write file system files.
  • 16. Copyright 2006-2009 Dan 16 M D Router • A router is the object that do something with messages once they have been received by a connector, or prior to being sent out by the connector
  • 17. Copyright 2006-2009 Dan 17 M D Filter • A filter optionally filters incoming or outgoing messages that are coming into or going out from a connector. • For example, the File Provider comes with a FilenameWildcardFilter that restricts which files are read by the connector based on file name patterns. For example only files with the .xml extension can be routed. • Filters are used in conjunction with Routers.
  • 18. Copyright 2006-2009 Dan 18 M D Transformer • A transformer optionally changes incoming or outgoing messages in some way • This is usually done to make the message format useable by a downstream function • Examples: – the ByteArrayToString transformer converts byte arrays into String objects.
  • 19. Copyright 2006-2009 Dan 19 M D Mule Event Flow • The nine stages of a mule event – first 2 – inbound – middle 4 – component – last 2 – outbound Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Inbound Component Outbound Optional Step
  • 20. Copyright 2006-2009 Dan 20 M D Message Receiver Endpoint • Some event triggers a message flow – A file being written into a folder – A message arriving on a message queue – A record in a database – Data written to a socket Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Endpoint (Message Receiver)
  • 21. Copyright 2006-2009 Dan 21 M D Inbound Router • The inbound router is the fist step in a message. Functions typically performed by an inbound router – Filtering – Remove duplicate messages – Matching messages – Aggregation (combining) – Re-sequence data – Forwarding • See also – IdempotentReceiver – CorrolationAggregator – CorrelationResequencer Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Endpoint (Message Receiver)
  • 22. Copyright 2006-2009 Dan 22 M D Interceptor • Used to intercept message flow into your service component • Used trigger monitor/events or interrupt the flow of the message • Example: an authorization interceptor could ensure that the current request has the correct credentials to invoke the service. Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Service Invocation Interceptor Endpoint (Message Receiver) Interceptor
  • 23. Copyright 2006-2009 Dan 23 M D Inbound Transformer • If the inbound data is not in the correct format for the service it must be transformed at this point Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Outbound Transformer Interceptor Service Invocation Interceptor Inbound Transformer
  • 24. Copyright 2006-2009 Dan 24 M D Service Invocation • The actual service is performed • In mule, this is generally a Java object • Service invocation can also be a "pass through" Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Outbound Transformer Interceptor Interceptor Inbound Transformer Service Invocation
  • 25. Copyright 2006-2009 Dan 25 M D Outbound Router • Dispatching the data to all the relevant endpoints Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Transformer Interceptor Interceptor Inbound Transformer Service Invocation Outbound Router
  • 26. Copyright 2006-2009 Dan 26 M D Built-in Router Classes Inbound Outbound Response Idempotent Receiver Filtering Outbound Router Response Aggregator Selective Consumer Recipient List Aggregator Multicasting Router Resequencer Chaining Router Forwarding Consumer Message Splitter Filtering List Message Splitter Filtering Xml Message Splitter Exception Based Router
  • 27. Copyright 2006-2009 Dan 27 M D Outbound Transformer • Any transformations that needs to be done on the message after a service has been performed on the message can be executed before it is put into the endpoint • See Also – EnvelopeInterceptor Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Interceptor Interceptor Inbound Transformer Service Invocation Outbound Router Outbound Transformer
  • 28. Copyright 2006-2009 Dan 28 M D Test Environment
  • 29. Copyright 2006-2009 Dan 29 M D Omitted From Examples for Brevity <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mule-configuration PUBLIC "-//MuleSource //DTD mule-configuration XML V1.0//EN" "http://mule.mulesource.org/dtds/mule- configuration.dtd">
  • 30. Copyright 2006-2009 Dan 30 M D Outline of Move All Files <mule-configuration> <model> <mule-descriptor> <inbound-router> <endpoint address="file:///c:/mule-class/in"/> </inbound-router> <outbound-router> <router> <endpoint address="file:///c:/mule-class/out"/> </router> </outbound-router> </mule-descriptor> </model> </mule-configuration>
  • 31. Copyright 2006-2009 Dan 31 M D Move All Files – Procedural Details <mule-configuration id="Mule_File_Move" version=" 1.0"> <connector name="SystemStreamConnector" className="org.mule.providers.stream.SystemStreamConnector" /> <model name="move-all-files"> <mule-descriptor name="move-file" implementation="org.mule.components.simple.BridgeComponent" > <inbound-router> <endpoint address="file:///c:/tmp/in"/> </inbound-router> <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRou ter"> <endpoint address="file:///c:/tmp/out"/> </router> </outbound-router> </mule-descriptor> </model> </mule-configuration>
  • 32. Copyright 2006-2009 Dan 32 M D Only Moving XML Files <inbound-router> <endpoint address="file:///c:/mule-class/in"> <filter pattern="*.xml" className= "org.mule.providers.file.filters.FilenameWildcardFilter"/> </endpoint> </inbound-router> Add the filter line to only move files with the extension "*.xml". If you add a file "foobar.txt to the input folder it will not be moved.
  • 33. Copyright 2006-2009 Dan 33 M D Keeping the Name The Same <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRouter"> <endpoint address= "file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]" /> </router> </outbound-router> Add the outputPattern parameter to keep the output name the same as the input.
  • 34. Copyright 2006-2009 Dan 34 M D Happy Path and Exceptions • By default, error free documents follow a central path known as the "happy path" • Documents that have errors may be handled in different ways (rejected, warnings etc.) Start StopStep 1 Step 2 Step 3 Stop Stop Stop
  • 35. Copyright 2006-2009 Dan 35 M D Exception Handling • Mule has a special way of handling non-happy path processing. This is called an "Exception Strategy" but is it really just and exception path and there is very little strategy involved. • There are three places you can associate an exception strategy – connector – component – model (set for all components in a model)
  • 36. Copyright 2006-2009 Dan 36 M D Exception Strategy <exception-strategy className=org.mule.impl.DefaultComponentExceptionStrategy"> <endpoint address="file:///c:/mule-class/error"/> </exception-strategy> We want all invalid documents to be moved into the error folder.
  • 37. Copyright 2006-2009 Dan 37 M D Sample XML <?xml version="1.0" encoding="UTF-8"?> <Data> <Element1>Hello World!</Element1> <Element2>String</Element2> <Element3>String</Element3> <DansInvalidDataElement>This is Dans invalid data element</DansInvalidDataElement> </Data> XML Schema validation will generate an error message when it gets to the fourth invalid data element: Given the following XML Schema file:
  • 38. Copyright 2006-2009 Dan 38 M D Validating against an XML Schema <outbound-router> <router className="org.mule.routing.outbound.FilteringXmlMessageSplitter"> <endpoint address="file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"/> <properties> <property name="validateSchema" value="true"/> <property name="externalSchemaLocation" value="file:///c:/mule-class/labs/07-validate/my- schema.xsd"/> </properties> </router> </outbound-router> To validate the XML Schema, just add two properties: 1) tell it to validate the document 2) tell it what file to use and where to find it
  • 39. Copyright 2006-2009 Dan 39 M D Error Message document : cvc-complex-type.2.4.d: Invalid content was found starting with element 'DansInvalidDataElement'. No child element is expected at this point. This error message is generated on the Mule console when an invalid data element is found. But what should we do with it? How do we redirect it to the appropriate user?
  • 40. Copyright 2006-2009 Dan 40 M D Thank You! Please contact me for more information: • Enterprise Service Bus • Enterprise Integration • Metadata Management • Metadata Registries • Service Oriented Architectures • Business Intelligence and Data Warehouse • Semantic Web Dan McCreary, President Dan McCreary & Associates Metadata Strategy Development dan@danmccreary.com (952) 931-9198