Java Reference
In-Depth Information
The implementation is a simple useless implementation of the interface:
package com.apress.springenterpriserecipes.springintegration.myholiday;
import java.util.Arrays;
import java.util.List;
import org.springframework.beans.factory.InitializingBean;
public class VacationServiceImpl implements VacationService, InitializingBean {
private List<HotelReservation> hotelReservations;
public void afterPropertiesSet() throws Exception {
hotelReservations = Arrays.asList(
new HotelReservation("Bilton", 243.200F),
new HotelReservation("West Western", 75.0F),
new HotelReservation("Theirfield Inn", 70F),
new HotelReservation("Park Inn", 200.00F));
public List<HotelReservation> findHotels(HotelReservationSearch searchMsg) {
try {
} catch (Throwable th) {
// eat the exception
return hotelReservations;
This chapter discussed building an integration solution using Spring Integration, an ESB-like framework
built on top of the Spring framework. You were introduced to the core concepts of enterprise application
integration (EAI). You learned how to handle a few integration scenarios, including JMS, and file polling.
You saw how to build a custom endpoint to talk to Twitter and how to hide the integration functionality
behind a POJO service interface using a gateway so that clients can interface synchronously while the
server still enjoys the benefits of a decoupled, asynchronous, message-oriented architecture.
In the next chapter, you will work with Spring Batch, a batch-processing framework built on top of
the Spring platform to handle long-running jobs.
Search WWH ::

Custom Search