package com.lance.mq.producer.config;

import javax.jms.Queue;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Description;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.support.converter.SimpleMessageConverter;

@Configuration
@Description(value = "ActiveMQ Configuration")
public class ActiveMQConfig {
	public static final String QUEUE_HELLO = "queue.hello";
	
	@Bean(name="helloQueue")
	public Queue helloQueue() {
		return new ActiveMQQueue(QUEUE_HELLO);
	}
	
	@Bean(name="jmsTemplate")
	public JmsTemplate jmsTemplate(ActiveMQConnectionFactory connectionFactory ) {
		JmsTemplate template = new JmsTemplate(connectionFactory);
		template.setDefaultDestination(helloQueue());
		template.setMessageConverter(new SimpleMessageConverter());
		return template;
	}
}

@@ -161,16 +161,73 @@
 QQueue;%0A
+import org.apache.activemq.pool.PooledConnectionFactory;%0A
 import o
@@ -765,16 +765,243 @@
 );%0A%09%7D%0A%09%0A
+%09public PooledConnectionFactory connectionFactory(ActiveMQConnectionFactory connectionFactory) %7B%0A%09%09PooledConnectionFactory pool = new PooledConnectionFactory(connectionFactory);%0A%09%09pool.setMaxConnections(5);%0A%09%09return pool;%0A%09%7D%0A%09%0A
 %09@Bean(n
@@ -1094,17 +1094,16 @@
 nFactory
- 
 ) %7B%0A%09%09Jm
@@ -1152,24 +1152,43 @@
 ctionFactory
+(connectionFactory)
 );%0A%09%09templat

update activemq producer support pool