About this book

Mule, as the preeminent open source integration platform, provides a framework for implementing integration solutions. This book will give you the tools for using Mule effectively. It’s not a user guide: Mule’s comprehensive user guide is available online already. Instead, it’s a review of Mule’s main moving parts and features put into action in real-world contexts. After a bit of history and some fundamentals about configuring Mule, we’ll walk you through the different family of components that you’ll use in your projects. We’ll then review some runtime concerns such as exception handling, transactions, security, and monitoring. Then we’ll delve into advanced subjects such as programming with Mule’s API, business process orchestration, and tuning.

Who should read this book

This book is primarily targeted at Java developers who want to solve integration challenges using the Mule platform. It’s also useful for architects and managers who’re evaluating Mule as an integration platform or ESB solution. The majority of Mule’s functionality can be leveraged without writing a line of Java code. As such, system administrators who find themselves repeatedly solving the same integration problems will also find this book useful. Additionally, system administrators tasked with supporting Mule instances will find this book, in particular part 2, of value.

How to use this book

The chapters in this book build upon each other. Readers new to Mule are encouraged to read the book in this manner. Readers familiar with Mule 1.x will find part 1 particularly useful, as it describes and provides examples of the new configuration syntax in depth. This book isn’t intended as a reference manual-we deliberately chose to provide examples of working Mule configurations over tables of XML Schema elements. More importantly, providing such a book would duplicate the content already available at www.mulesource.org, the Mule Javadocs, and the XSD documentation-where complete reference documentation is available. We’re hoping that reading Mule in Action gives you the skills to use these resources effectively.

Roadmap

Chapter 1 introduces the origins and history of the Mule project. You’ll also discover the architecture and terminology of Mule ESB.
Chapter 2 details the configuration of Mule with XML files and how you can organize them efficiently.
Chapter 3 shows you how to use Mule’s transport functionality to move data around using different mechanisms, like SOAP or JMS.
Chapter 4 covers Mule’s routing functionality. You’ll see how Mule’s routers let you control how data enters and leaves your services.
Chapter 5 describes message transformation within Mule. You’ll learn about commonly used transformers and will even create your own.
Chapter 6 covers service components and how you can leverage them to add custom behavior in your Mule services.
Chapter 7 details the different aspects of deploying Mule within your IT landscape, including deployment topologies.
Chapter 8 describes how to handle exceptions and logging with Mule. We’ll cover how exception strategies and logging let you identify and recover from errors.
Chapter 9 shows you how to secure your Mule applications. You’ll see how Mule’s security features let you authenticate, authorize, and encrypt messages that pass through your services.
Chapter 10 covers Mule’s transactions support. You’ll see how business expectations can be enforced by applying transactions on your endpoints.
Chapter 11 details your options in terms of monitoring Mule instances. You will also learn about best practices for auditing and discover how to build dashboards.
Chapter 12 shows you how to use Mule’s development tooling support and testing features to simplify your life.
Chapter 13 describes the principal members of the API you will use when writing custom code for your Mule projects.
Chapter 14 covers Mule’s support for scripting functionality. You’ll see how Rhino and Groovy can be used to accelerate the development of components, transformers, and custom routers.
Chapter 15 covers how the jBPM and Quartz transports can be used for service orchestration and scheduling.
Chapter 16 explains the threading model of Mule, how to configure it, and how to profile and tune the ESB.

Code conventions

The code examples in this book are abbreviated in the interest of space. In particular, namespace declarations in the XML configurations and package import in Java classes have been omitted. The reader is encouraged to use the source code of the book when working with the examples. The line length of some of the examples exceeds that of the page width. In cases like these, the å marker is used to indicate a line has been wrapped for formatting.

All source code in listings or in text is in a fixed-width font like this to separate it from ordinary text. Code annotations accompany many of the listings, highlighting important concepts. In some cases, numbered bullets link to explanations that follow the listing.

Source code downloads

The source code of the book is available online from the publisher’s website at http://www.manning.com/MuleinAction, as well as from this URL: http://code. google.com/p/muleinaction/.

Software requirements

The required configuration to run these examples follows:

Mule Community Release can be downloaded from this page: http://www.mulesource.org/display/MULE/Download.

Author Online

The purchase of Mule in Action includes free access to a private web forum run by Manning Publications, where you can make comments about the book, ask technical questions, and receive help from the authors and from other users. To access the forum and subscribe to it, point your web browser to http://www.manning.com/MuleinAction. This page provides information about how to get on the forum once you’re registered, what kind of help is available, and the rules of conduct on the forum.

Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the authors can take place. It’s not a commitment to any specific amount of participation on the part of the authors, whose contribution to the book’s forum remains voluntary (and unpaid). We suggest you try asking them some challenging questions, lest their interest stray!

The Author Online forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.