Java Reference
In-Depth Information
C H A P T E R 8
■ ■ ■
Spring Integration
In this chapter, you will learn the principles behind enterprise application integration, used by many
modern applications to decouple dependencies between components. The Spring framework provides
a powerful and extensible framework called Spring Integration, which provides the same level of
decoupling to enterprise applications and data that the core Spring framework provides to components
within an application.
This chapter aims to give you all the required knowledge to understand the patterns involved in
enterprise application integration (EAI) , what an enterprise service bus (ESB) is, and how to build
solutions using Spring Integration.
Upon finishing this chapter, you will be able to write fairly sophisticated Spring Integration
processes to decouple applications from one another and to enable them to share services and data. You
will learn Spring Integration's many options for configuration, including by XML and by annotation.
You will also see why Spring Integration provides a very attractive alternative for people coming from a
classic enterprise application integration background. If you've used another ESB before, such as Mule
or ServiceMix, or a classical EAI server such as Axway's Integrator or TIBCO, the idioms explained here
should be familiar, and the configuration refreshingly straightforward.
8-1. Getting Started with Spring Integration
Problem
You want to get started with Spring Integration, but the JARs aren't in the standard Spring distribution.
Solution
You can use Maven or Ivy, or you can download the JARs manually as a separate project. If you choose
the Maven/Ivy route or want to use OSGi, there are different approaches you might take (discussed
following).
How It Works
The simplest way to get started with Spring Integration is to simply download the Spring Integration
binaries from http://www.SpringFramework.org/spring-integration an d add the JARs provided to your
classpath. The package is very modular, so if you don't need support for consumption of XML messages,
for example, you can simply omit the JAR that provides it. There's no harm in loading them all, though! If
 
Search WWH ::




Custom Search