About this Book

This book is for everyone interested in open source ESBs in general and Mule and ServiceMix in particular. For consultants and architects, this book provides an excellent overview of the functionality provided by Mule and ServiceMix and other open source–based integration frameworks. For developers, this book provides numerous code examples and a ready-to-go development environment that you can use to start your projects.

We use Mule 2.0.2 and ServiceMix 3.2.1 in this book. New versions of Mule and ServiceMix will be released at a constant rate; for example when this book went to press, ServiceMix had a new maintenance release, version 3.2.2. If you are looking for updated examples that will work with newer versions of Mule or ServiceMix, please visit our website at http://www.esbinaction.com.

Roadmap

Part 1 of the book starts by explaining the core functionalities of an ESB and the project structure and architecture of Mule and ServiceMix, including some basic examples. Be sure you don’t skip this part!

  • Chapter 1 introduces the functionality that an ESB is expected to provide. We explain seven core functionalities in detail. We also provide an overview of the currently available open source ESBs with a detailed comparison. We finish the chapter with a hello world example that uses Mule and ServiceMix.
  • Chapter 2 explores the architecture of both Mule and ServiceMix. We describe Mule concepts like endpoints, routers, transformers, and components and work through examples. With ServiceMix, we introduce the JBI specification and discuss service engines, binding components, and the Normalized Message Router (NMR). In this chapter we also provide some examples of how to implement service Units to be deployed on ServiceMix.
  • Chapter 3 introduces three technologies that complement the Mule and ServiceMix open source ESBs: Spring, JiBX, and ActiveMQ. We also set up a development environment that includes all the tools and libraries you’ll need throughout the book. The chapter ends with Mule and ServiceMix examples that use the three new technologies and test the development environment.
  • Chapter 4 describes how to develop simple integration solutions with Mule and ServiceMix. We finish this chapter with a description of a message flow and a more complex example implementation.

Part 2 discusses the core functionalities of Mule and ServiceMix in more detail, with lots of examples including routing, transformation, connectivity, web services, and error handling:

  • Chapter 5 shows how to implement routing, validation, and transformation in Mule and ServiceMix. We also show an alternative implementation for routing and validation that uses Apache Synapse.
  • Chapter 6 discusses the most common connectivity options for Mule and ServiceMix. They include JMS, FTP, File, JDBC, and Mail, and we demonstrate their use with lots of practical examples.
  • Chapter 7 is dedicated to web services functionality. Mule and ServiceMix use Apache CXF (the successor of XFire) as their main web services platform. We show examples that use a top-down approach (WSDL to Java) and a bottom-up approach (Java to WSDL).
  • Chapter 8 explores more complex ESB functionality. We present a number of examples that involve error handling, showing you Mule’s and ServiceMix’s extensive ability to handle exceptions. We also discuss security and transactions.

In part 3, we introduce a pattern-based design approach and implement a full case study using Mule and ServiceMix. We also present a monitoring and management environment, and we use a case study to demonstrate integration with a process engine:

  • Chapter 9 starts with an introduction to Enterprise Integration patterns and provides a pattern-based design approach you can use in open source ESB projects. We also describe a case study with full example implementations in both Mule and ServiceMix.
  • Chapter 10 talks about the management and monitoring parts of an open source ESB, related to the case study from chapter 9. We explain how to use JMX and JConsole to manage your Mule and ServiceMix environment, and we show how to use MC4J to monitor these open source ESBs.
  • Chapter 11 introduces the use of a process engine together with an ESB. We show how you can use jBPM as a process engine, together with Mule as an ESB, to implement a process-driven integration solution. We also explain how to use Apache ODE as a process engine, together with ServiceMix as an ESB, for the same example integration solution.

Code conventions

All source code in listings or in text is in a fixed-width font like this to separate it from ordinary text. We use two dominant languages and markups in this book—Java and XML—and we try to adopt a consistent approach. Method and function names, object properties, XML elements, and attributes in text are presented using this same font.

In many cases, the original source code has been reformatted; we’ve added line breaks and reworked indentation to accommodate the available page space in the book. In rare cases even this was not enough, and listings include line-continuation markers. Additionally, many comments have been removed from the listings. Where appropriate, we’ve also cut implementation details that distract rather than help tell the story, such as JavaBean setters and getters, import and include statements, and namespace declarations.

Code annotations accompany many of the listings, highlighting important concepts. In some cases, numbered bullets link to explanations that follow the listing.

Code downloads

Source code for all of the working examples in this book is available for download from www.manning.com/OpenSourceESBsinAction. Basic setup documentation is provided with the download.

Because this book covers a wide range of topics related to open source ESBs, we also introduce many tools and frameworks, including databases, process engines, LDAP servers, and XML serialization. To make it easier for you to set up the environment, we’ve provided an Ant build script that downloads all the necessary tools and frameworks and creates the right directory structure. For a full explanation of the project structure, read chapter 3.

Author Online

The purchase of Open Source ESBs 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 www.manning.com/OpenSourceESBsinAction. 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 isn’t a commitment to any specific amount of participation on the part of the authors, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking the authors 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.

About the authors

TIJS RADEMAKERS is a software architect with more than six years of experience in designing and developing Java and EE applications. He works for Atos Origin, a large European system integrator, where he is responsible for SOA and BPM services and knowledge development. Tijs has designed and implemented large process- and application-integration solutions, primarily focused on open standards. He has extensive product knowledge of open source as well as closed source SOA and enterprise integration tools, including Mule, ServiceMix, jBPM, and WebSphere Process Server. Tijs is a regular speaker at Java conferences, where he talks about open source integration topics like Mule and ServiceMix. Tijs lives in the Netherlands near Eindhoven with his girlfriend and his new daughter, Liv.

JOS DIRKSEN has been working with Java and J2EE applications for more than six years as a software architect. The last couple of years, his focus topics have been open source, security, and quality. He has worked with various open source and commercial integration solutions, mostly in the areas of government and healthcare. Jos has a lot of project experience working with Mule, Apache Synapse, and Apache Axis2 and has also completed projects based on the integration tooling from IBM. Jos regularly gives presentation on open source, Mule, and other related topics. He lives in Eindhoven, the Netherlands, with his wife.

About the title

By combining introductions, overviews, and how-to examples, the In Action books are designed to help learning and remembering. According to research in cognitive science the things people remember are things they discover during self-motivated exploration.

Although no one at Manning is a cognitive scientist, we’re convinced that for learning to become permanent it must pass through stages of exploration, play, and, interestingly, retelling of what is being learned. People understand and remember new things, which is to say they master them, only after actively exploring them. Humans learn in action. An essential part of an In Action book is that it’s example-driven. It encourages the reader to try things out, to play with new code, and explore new ideas.

There is another, more mundane, reason for the title of this book: Our readers are busy. They use books to do a job or solve a problem. They need books that allow them to jump in and jump out easily and learn just what they want just when they want it. They need books that aid them in action. The books in this series are designed for such readers.

About the cover illustration

The figure on the cover of Open Source ESBs in Action is captioned “A traveling salesman” and it is taken from a 19th century edition of Sylvain Maréchal’s four-volume compendium of regional dress customs published in France. Each illustration is finely drawn and colored by hand.

The rich variety of Maréchal’s collection reminds us vividly of how culturally apart the world’s towns and regions were just 200 years ago. Isolated from each other, people spoke different dialects and languages. In the streets or in the countryside, it was easy to identify where they lived and what their station in life was just by their dress.

Dress codes have changed since then and the diversity by region, so rich at the time, has faded away. It is now hard to tell apart the inhabitants of different continents, let alone different towns or regions. Perhaps we have traded cultural diversity for a more varied personal life—certainly for a more varied and fast-paced technological life.

At a time when it is hard to tell one computer book from another, Manning celebrates the inventiveness and initiative of the computer business with book covers based on the rich diversity of regional life of two centuries ago, brought back to life by Maréchal’s pictures.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.136.84