Java Reference
In-Depth Information
xmlns=" http://www.springframework.org/schema/integration"
xmlns:context=" http://www.springframework.org/schema/context"
xmlns:jms=" http://www.springframework.org/schema/integration/jms"
xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/
spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/
spring-integration-1.0.xsd
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/
spring-integration-jms-1.0.xsd
">
<beans:import resource="solution041.xml" />
<context:annotation-config />
<channel id="requests" />
<channel id="responses" />
<jms:outbound-gateway
request-destination-name="inboundHotelReservationSearchDestination"
request-channel="requests"
reply-destination-name="outboundHotelReservationSearchResultsDestination"
reply-channel="responses"
connection-factory="connectionFactory" />
<gateway id="vacationService"
service-interface="com.apress.springenterpriserecipes.
springintegration.myholiday.VacationService" />
</beans:beans>
One thing that's conspicuously absent is any mention of an output or input channel from and to the
gateway element . While it is possible to declare default request/reply message queues, realistically, most
methods on an interface will require their own request/response queues. So, you configure the channels
on the interface itself.
package com.apress.springenterpriserecipes.springintegration.myholiday;
import java.util.List;
import org.springframework.integration.annotation.Gateway;
public interface VacationService {
@Gateway(requestChannel = "requests", replyChannel = "responses")
List<HotelReservation> findHotels(HotelReservationSearch hotelReservationSearch);
}
Search WWH ::




Custom Search