From cd7deeb5a7df3cc1ef5871e7dd6a9a5176a6dede Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 3 Feb 2010 00:29:49 +0000 Subject: [PATCH] fixed JmsTemplate example (SPR-6789) git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2903 50f2f4bb-b051-0410-bef5-90022cba6387 --- spring-framework-reference/src/jms.xml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/spring-framework-reference/src/jms.xml b/spring-framework-reference/src/jms.xml index ca48e5835c0..525ce17afc2 100644 --- a/spring-framework-reference/src/jms.xml +++ b/spring-framework-reference/src/jms.xml @@ -394,7 +394,7 @@ public class JmsQueueSender { private Queue queue; public void setConnectionFactory(ConnectionFactory cf) { - this.jmsTemplate = new JmsTemplate(cf, false); + this.jmsTemplate = new JmsTemplate(cf); } public void setQueue(Queue queue) { @@ -412,15 +412,13 @@ public class JmsQueueSender { This example uses the MessageCreator callback to create a text message from the supplied Session - object and the JmsTemplate is constructed by - passing a reference to a ConnectionFactory and a - boolean specifying the messaging domain. A zero argument constructor and - connectionFactory / queue bean - properties are provided and can be used for constructing the instance + object. The JmsTemplate is constructed by passing a + reference to a ConnectionFactory. As an alternative, + a zero argument constructor and connectionFactory / + is provided and can be used for constructing the instance in JavaBean style (using a BeanFactory or plain Java code). Alternatively, consider deriving - from Spring's JmsGatewaySupport convenience base - class, which provides pre-built bean properties for JMS - configuration. + from Spring's JmsGatewaySupport convenience base class, + which provides pre-built bean properties for JMS configuration. The method send(String destinationName, MessageCreator creator) lets you send to a message using the string name of