The majority of the open source Java frameworks have focused on supporting database-backed web sites. Developers have leveraged these frameworks to create highly scalable and performant vertical applications using projects such as Spring and Hibernate. Recently, a number of frameworks have been developed with the purpose of solving the horizontal problem of integrating data and services between disparate applications across the enterprise. Spring Integration is one of these solutions.
Enterprise integration is an architectural approach for integrating disparate services and data in software. Enterprise integration seeks to simplify and automate business processes without requiring comprehensive changes to the existing applications and data structures. Spring Integration is an extension of Spring’s Plain Old Java Object (POJO) programming model to support the standard integration patterns while building on the Spring Framework’s existing support for integration with systems and users.
The Spring Framework is the most widely used framework in organizations today. Spring Integration works in terms of the fundamental idioms of integration, including messages, channels, and endpoints. It enables messaging within Spring-based applications and integrates with external systems via Spring Integration’s adapter framework. The adapter framework provides a higher level of abstraction over Spring’s existing support for remote method invocation, messaging, scheduling, and much more. Developers already familiar with the Spring Framework will find Spring Integration easy to pick up, since it uses the same development model and idioms.
This book will cover the vast world of enterprise application integration, as well as the application of the Spring Integration framework toward solving integration problems. The book can be summed up as the following:
This book is for any developer looking for a more natural way to build event-driven applications using familiar Spring idioms and techniques. The book is also for architects seeking to better their applications and increase productivity in their developers. You should have a basic understanding of the Java language. A familiarity with the Spring Framework and messaging are useful, but not required, as we provide an introduction to those concepts.
To give you a quick idea of what this book covers, here’s a brief chapter-by-chapter overview:
Sometimes when we want you to pay particular attention to a part within a code example, we will make the font bold. Please note that the bold does not necessarily reflect a code change from the last version. In cases when a code line is too long to fit the page’s width, we break it with a code continuation character, which looks like this: . Please note that when you type out the code, you have to concatenate the line by yourself without any spaces.
Because the Java programming language is platform independent, you are free to choose any supported operating system. However, some of the examples in this book use platform-specific paths. Translate them as necessary to your operating system’s format before typing out the examples. To make the most of this book, install JDK version 1.5 or higher. You should have a Java IDE installed to make development easier. For this book, the sample code is Maven based. If you’re running Eclipse and you install the m2eclipse plug-in, you can open the same code in Eclipse, and the class path and dependencies will be filled in the by the Maven metadata. If you’re using Eclipse, you might prefer SpringSource’s free SpringSource Tool Suite (STS) (www.springsource.com/developer/sts
), which comes preloaded with all the plug-ins you will need to be as efficient as possible with the Spring Framework.
If you use NetBeans or IntelliJ IDEA, there are no special configuration requirements: they already support Maven out of the box and also provide some support for Spring.
This book uses Maven (2.2.1 or higher). The recommended approach is to simply use a tool like Maven, Ant, Ivy, or Gradle to handle dependency management. The Maven dependency coordinates given in this book can also be used with Ivy, Gradle, and others.
The source code for this book is available from the Apress web site (www.apress.com
), in the Source Code section. The source code is organized by chapters, each of which includes one or more independent examples. Note that there are four Spring Integration sandbox projects used in this book. Sandbox projects tend to be a moving target and we will do our best to keep the information up to date at the Apress web site for any changes required to build these projects. More information about build the sandbox project may be found in the readme.txt file within the source code.
We always welcome your questions and feedback regarding the content of this book. You can reach Mark Lui via his blog at http://drmarklui.wordpress.com
, or via e-mail at [email protected]
. Mario Gray can be contacted through his blog at http://www.sudoinit5.com
, or by e-mail at [email protected]
. Andy Chan can be reached via Twitter (@iceycake
) or his blog site, http://www.iceycake.com
. Josh Long can be reached at his blog at http://www.joshlong.com
, by e-mail at [email protected]
, or on Twitter (@starbuxman
).
3.147.27.171