Queue queue = (Queue) appContext.getBean("messageworkDestination");
try {
for (int i = 0; i < numListeners; i++) {
LOG.debug("Creating a new QueueConnection...");
QueueConnection newConnection = queueConnectionFactory.createQueueConnection();
MessageDispatcher dispatcher = new MessageDispatcher();
QueueSession session = newConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
QueueReceiver messageConsumer = session.createReceiver(queue);
messageConsumer.setMessageListener(dispatcher);
newConnection.start();
connections.add(newConnection);