Access Keys:
Skip to content (Access Key - 0)
Unknown macro: {mulecore_mulenav}

Ok, so you want to get started with EAI in five minutes? Well, you've come to the right place. Go ahead and put a pot of coffee on if you want, but you'll have Mule up and running before its ready!

Overview

Mule is at heart an Enterprise Service Bus, or ESB. In essence, the job of an ESB is to act as a sort of transit system for carrying data between applications within or without your Intranet. The ESB, Mule in this case, is defined to have a series of stops, or "endpoints", through which applications can send or receive data onto or from the system.

What makes an ESB really powerful is that it can (or at least should) support a wide variety of protocols and data formats. Mule does this so well, it in fact goes beyond the proper definition of an ESB because it supports different kinds of deployment topologies, such as ESB, pipeline, peer network, client/server, etc.

Now that you know a bit about what you are getting into, let's go!

Prerequisites

First, there are a couple of things you need to check in your environment. You need a valid Java JDK (1.4 or better, although we recommend 1.5), which you can get from http://java.sun.com. You need either Apache Ant (1.6.5), http://ant.apache.org, or Maven (2.0.4), http://maven.apache.org, in order to run some of the samples.

Download and Install Mule

Once you have the prerequisites taken care of, surf on over to http://mule.mulesource.org/wiki/display/MULE/Downloadand grab the latest "Full" release (only the "Full" release contains the samples). Both gzipped and zipped versions are available. Download the appropriate archive and unpack it to some directory. For example, on Unix, you might type:

cd /home/mule
tar zxvf /tmp/mule-1.3.tar.gz

Once unpacked, cd into the distribution directory, mule-1.3. Before going any further, set the MULE_HOME environment variable to this directory. On Unix, type

export MULE_HOME=<path-to-distribution>

On Windows, you might type:

set MULE_HOME=<path-to-distribution>

From here on, we'll refer to the Mule distribution root directory simply as $MULE_HOME.

That's it! You've just installed Mule.

Running an example

Of course, the basic Mule installation won't run until you create an configuration file that defines the routes, endpoints, connectors and other components Mule will use. To see something in action, therefore, we'll use one of the samples.

Start by cd'ing into $MULE_HOME/examples/ant/hello. The Hello World sample is explained more here, but to get going now, just type:

hello

The script will give you three options - choose (3), or "Receive events via HTTP". Hit return, and Mule will start. But you won't type anything in this window. Instead, open up a browser and enter the URL: http://localhost:8888/?name=<your name>. Ever polite, Mule will respond!

Explanation

What just happened was that you ran a Mule using a sample configuration file that defined a route or pathway for processing data to and from an HTTP browser. In this case, you can find the configuration file in the $MULE_HOME/examples/ant/hello/conf directory - it is called hello-http-config.xml.

This file specifies the "route" inside the <model> tag. It configures Mule to listen for incoming data from HTTP clients on port 8888. When an HTTP request is received, the URI is prepended with the word "Hello", appended with the phrase "How are you?", and returned to the HTTP client.

Now this is of course a trivial exercise - however, it demonstrates two important things. First, Mule has a wide range of connectors: email, soap (Axis, Glue, Xfire), tcp, file, ftp, email, jms, rmi and, of course, the HTTP one we just used. Secondly, Mule doesn't just have to pass data around: it can change it and filter it. Through a variety of filters and transformers, you have the option of adding logic to the routing and distribution of your data. And really, all of this only slightly more difficult than this simple example.

Conclusion

Now that wasn't hard, was it? In fact, if you've ever experimented with other ESB or SOA products, chances are none of them can be downloaded, installed and run inside of five minutes. And that's the joy of Mule. Out-of the box operation, loads of features, and a reliable, highly scalable messaging framework. So go on, get that coffee (should be just about done now), start digging through the rest of the documentation and enter the world of Mule!

Adaptavist Theme Builder (3.3.2-conf2.10) Powered by Atlassian Confluence 2.10, the Enterprise Wiki.
Free theme builder license