It just doesn't get any cleaner than that! No Spring Integration interfaces whatsoever. You make a
request, searching is done, and you get the result back when the processing is done.
The service implementation for this setup is interesting, not because of what you've added, but
because of what's not there:
<?xml version="1.0" encoding="UTF-8"?>
<beans:import resource="solution041.xml" />
<channel id="inboundHotelReservationSearchChannel" />
<channel id="outboundHotelReservationSearchResultsChannel" />
<beans:bean id="vacationServiceImpl" . ➥
Here you've defined an inbound JMS gateway element . The messages from the inbound JMS
gateway are put on a channel, inboundHotelReservationSearchChannel , whose messages are forwarded
to a service-activator , as you would expect. The service-activator is what handles actual processing.
What's interesting here is that there's no mention of a response channel, for either the service-
activator , or for the inbound JMS gateway. The service-activator looks, and fails to find, an
reply channel and so uses the reply channel created by the inbound JMS gateway, which in turn has
created the reply channel based on the header metadata in the inbound JMS message. Thus, everything