diff --git a/src/reference/docbook/jms.xml b/src/reference/docbook/jms.xml index a051e62dfb..c2e196520d 100644 --- a/src/reference/docbook/jms.xml +++ b/src/reference/docbook/jms.xml @@ -11,8 +11,8 @@ As you can see from above by using JmsTemplate and MessageListener container Spring Integration relies on Spring's JMS support. - This is important to understand since most of the attributes exposed on these adapters will configure the underlying Spring's JmsTemplate and/or - MessageListener container. For more details about JmsTemplate and MessageListener container please refer to + This is important to understand since most of the attributes exposed on these adapters will configure the underlying Spring's JmsTemplate and/or + MessageListener container. For more details about JmsTemplate and MessageListener container please refer to Spring JMS documentation. @@ -68,7 +68,7 @@ Message-Driven Channel Adapter The "message-driven-channel-adapter" requires a reference to either an instance of a Spring MessageListener - container (any subclass of AbstractMessageListenerContainer) or both + container (any subclass of AbstractMessageListenerContainer) or both ConnectionFactory and Destination (a 'destinationName' can be provided in place of the 'destination' reference). The following example defines a message-driven Channel Adapter with a Destination reference. @@ -91,7 +91,7 @@ Finally, the <message-driven-channel-adapter> also accepts the 'error-channel' attribute. This provides the same basic functionality as described in . - ]]> @@ -161,16 +161,16 @@ As with anything else, Gateway invocation might result in error. - By default Producer will not be notified of the errors that might have occurred on the consumer side and will time out waiting for - the reply. However there might be times when you want to communicate an error condition back to the consumer, - in other words treat the Exception as a valid reply by mapping it to a Message. To accomplish this + By default Producer will not be notified of the errors that might have occurred on the consumer side and will time out waiting for + the reply. However there might be times when you want to communicate an error condition back to the consumer, + in other words treat the Exception as a valid reply by mapping it to a Message. To accomplish this JMS Inbound Gateway provides support for a Message Channel to which errors can be sent for processing, potentially resulting in a reply Message payload that conforms to some contract defining what a caller may expect as an "error" reply. Such a channel can be configured via the error-channel attribute. - @@ -207,39 +207,39 @@ Message to be subsequently sent to the 'reply-channel' as shown in the example configuration above. - +
Mapping Message Headers to/from JMS Message - + - JMS Message can contain meta-information such as JMS API headers as well as simple properties. + JMS Message can contain meta-information such as JMS API headers as well as simple properties. You can map those to/from Spring Integration Message Headers using JmsHeaderMapper. - The JMS API headers are passed to the appropriate setter methods (e.g. setJMSReplyTo) whereas other headers will + The JMS API headers are passed to the appropriate setter methods (e.g. setJMSReplyTo) whereas other headers will be copied to the general properties of the JMS Message. - JMS Outbound Gateway is bootstrapped with the default implementation of JmsHeaderMapper which will map + JMS Outbound Gateway is bootstrapped with the default implementation of JmsHeaderMapper which will map standard JMS API Headers as well as primitive/String Message Headers. Custom header mapper could also be provided via header-mapper attribute of inbound and outbound gateways. - +
- - + +
Message Conversion, Marshalling and Unmarshalling - If you need to convert the message, all JMS adapters and gateways, allow you to + If you need to convert the message, all JMS adapters and gateways, allow you to provide a MessageConverter via message-converter attribute. Simply provide the bean name of an instance of MessageConverter that is available within the same - ApplicationContext. + ApplicationContext. Also, to provide some consistency with Marshaller and Unmarshaller interfaces Spring provides MarshallingMessageConverter which you can configure with your own custom Marshallers and Unmarshallers - - - @@ -247,10 +247,10 @@ - - ]]> - - + + ]]> + + Note, however, that when you provide your own MessageConverter instance, it will still be wrapped within the HeaderMappingMessageConverter. This means that the 'extract-request-payload' @@ -327,18 +327,37 @@
JMS Samples - - To experiment with these JMS adapters, check out JMS samples available in our new Samples Git repository - available here: http://git.springsource.org/+spring-integration/spring-integration/samples . - There are two samples included. One provides inbound and outbound Channel Adapters, and the - other provides inbound and outbound Gateways. They are configured to run with an embedded ActiveMQ process, but - the "common.xml" file can easily be modified to support either a different JMS provider or a standalone - ActiveMQ process. In other words, you can split the configuration so that the inbound and outbound adapters are - running in separate JVMs. If you have ActiveMQ installed, simply modify the "brokerURL" property within the - configuration to use "tcp://localhost:61616" for example (instead of "vm://localhost"). Both of the samples - accept input via stdin and then echo back to stdout. Look at the configuration to see how these messages are - routed over JMS. - + + To experiment with these JMS adapters, check out the JMS samples available + in the Spring Integration Samples Git repository: + + + + https://github.com/SpringSource/spring-integration-samples/tree/master/basic/jms + + + + There are two samples included. One provides Inbound + and Outbound Channel Adapters, and the other provides + Inbound and Outbound Gateways. + They are configured to run with an embedded + ActiveMQ + process, but the samples' + common.xml + Spring Application Context file can easily be modified + to support either a different JMS provider or a standalone ActiveMQ + process. + + + In other words, you can split the configuration, so that the + Inbound and Outbound Adapters are running in separate JVMs. If you have + ActiveMQ installed, simply modify the + brokerURL property within the common.xml + file to use tcp://localhost:61616 (instead of + vm://localhost). Both of the samples accept input + via stdin and then echo back to stdout. Look at the configuration to see + how these messages are routed over JMS. +