From 064f6694f6599dc5641cc7bcbe12a8cbcee8ca9e Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Thu, 19 Mar 2009 22:17:54 +0000 Subject: [PATCH] Resolved INT-613 --- .../jms/ChannelPublishingJmsMessageListener.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/org.springframework.integration.jms/src/main/java/org/springframework/integration/jms/ChannelPublishingJmsMessageListener.java b/org.springframework.integration.jms/src/main/java/org/springframework/integration/jms/ChannelPublishingJmsMessageListener.java index 06a516c855..898ea71527 100644 --- a/org.springframework.integration.jms/src/main/java/org/springframework/integration/jms/ChannelPublishingJmsMessageListener.java +++ b/org.springframework.integration.jms/src/main/java/org/springframework/integration/jms/ChannelPublishingJmsMessageListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -214,7 +214,12 @@ public class ChannelPublishingJmsMessageListener implements SessionAwareMessageL jmsReply.setJMSCorrelationID(jmsMessage.getJMSMessageID()); } MessageProducer producer = session.createProducer(destination); - producer.send(jmsReply); + try { + producer.send(jmsReply); + } + finally { + producer.close(); + } } } }