Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
While Spring Batch provides a sophisticated batch job execution environment, Spring Integration provides an excellent integration environment for enterprise applications. With Spring Integration, information exchange with external systems becomes much easier, no matter where the information comes from or needs to be sent to. Out-of-the-box support for file, e-mail, and JMS-based integration is provided.
Even if your initial batch job execution requirements are very simple, we still recommend that you set up Spring Batch to integrate with Spring Integration to ensure that the application execution environment is flexible enough to cater to more complicated integration requirements in the future.
In the following sections, we will demonstrate how Spring Batch can work with Spring Integration to implement a file polling mechanism so that when a file arrives in a folder, Spring Integration will launch the import contact job automatically.