Introduction

There are a variety of ESBs available to handle medium to large scale messaging needs. Spring Integration is the latest of all of them. Backed by strong support from Spring Community and well established Dependency Injection feature, Spring integration(SI) can be used as a very strong middleware tool. It supports routing and transformation of messages so that different transports and different data formats can be integrated without impacting testability and scalability.

Background

The idea of Spring Integration comes from Enterprise Integration Patterns, by Gregor Hohpe, that categorizes and explains many of the integration patterns common to integration solutions.

The sample application is a small demonstration of what can be achieved using Spring Integration. For example, it shows how easily A POJO Gateway can be setup to communicate with an ActiveMQ Message Queue. From code side, the developer is relieved from JMS intricacies and left with simple XML configurations. The code remains pure POJO. Also note that Service itself is a POJO. All we have is a set of transformers/routers/endpoints/channels.

The example shows how a SOAP message can be sent over MQ and can be handled without any difficulty using XSLT/XPath support from Spring Integration. Also employed is Marshalling/Unmarshalling using Spring OXM and Castor.