Synchronize JMSPOllingConsumer destroy to avoid deadlocks
Port fix
Relates to
Resolves
@@ -420,6 +420,7 @@ public class JMSPollingConsumer {
}
public void destroy() {
+ synchronized (jmsConnectionFactory) {
if (messageConsumer != null) {
jmsConnectionFactory.closeConsumer(messageConsumer, true);
}
@@ -430,6 +431,7 @@ public class JMSPollingConsumer {
jmsConnectionFactory.closeConnection(connection, true);
}
}
+ }
private Message receiveMessage(MessageConsumer messageConsumer) throws JMSException {
Message msg = null;
