jmsListener.setTaskExecutor(jmsConfig.getTaskExecutor());
} else {
SimpleAsyncTaskExecutor taskExecutor = new SimpleAsyncTaskExecutor();
taskExecutor.setConcurrencyLimit(jmsConfig.getMaxConcurrentTasks());
jmsListener.setTaskExecutor(taskExecutor);
<BUG>}
JmsTemplate jmsTemplate = createJmsTemplate(jmsConfig, null);</BUG>
Destination dest = JMSFactory.resolveOrCreateDestination(jmsTemplate, destinationName, jmsConfig
.isPubSubDomain());
<BUG>jmsListener.setDestination(dest);
jmsListener.initialize();</BUG>
return jmsListener;

jmsListener.setTaskExecutor(jmsConfig.getTaskExecutor());
} else {
SimpleAsyncTaskExecutor taskExecutor = new SimpleAsyncTaskExecutor();
taskExecutor.setConcurrencyLimit(jmsConfig.getMaxConcurrentTasks());
jmsListener.setTaskExecutor(taskExecutor);
}
if (jmsConfig.isAutoResolveDestination()) {
jmsListener.setDestinationName(destinationName);
} else {
JmsTemplate jmsTemplate = createJmsTemplate(jmsConfig, null);
Destination dest = JMSFactory.resolveOrCreateDestination(jmsTemplate, destinationName, jmsConfig
.isPubSubDomain());
jmsListener.setDestination(dest);
