I have a situation where I need to get an address from my database and send that in a JMS response in a particular XML format. I have a service activator that deals with this and currently returns the correctly formatted XML for the response
My question is whether my service activator should return an "Address" object and I should have a transformer to transform it to the correct format for this output channel? That way the service could be used in other contexts and wouldnt be so tightly coupled. Any thoughts anyone?? Or is this over kill??
<chain input-channel="getAddressChannel" outputchannel="addressResponseChannel"> <service-activator ref="addressRequestHandler" /> </chain> <channel id="addressResponseChannel"></channel> <jms:outbound-channel-adapter id="jmsAddressResponse" destination-name="Q_ADDRESS_RESPONSE" channel="addressResponseChannel" />