Can you, please, give me a help on one simple problem. I need to use PooledConnectionFactory without spring, JMSTemplate. ActiveMQ says that this class is pooling connections, producers, sessions, and what is confusing me, I don't know how to get them from instance. I was waiting for some takeConnection(), and then realeaseConnection() and takeProducer() and realize producer(). What should I do after pooledConnectionFactory.start(); Normaly, I would do Connection c = pooledConnectionFactory.createConnection... Hope, I explained my problem. And how producers and sessions are pooled, if they are created directly from Connection.
connectionFactory = new ActiveMQConnectionFactory(
userId,
passWord,
brokerURL);
log.info("Queueing service init: BrokerURL: " + brokerURL + " UserId: " + userId + " Paasword: " + passWord);
pooledConnectionFactory = new PooledConnectionFactory(connectionFactory);
pooledConnectionFactory.setIdleTimeout(5000);
pooledConnectionFactory.setMaxConnections(10);
pooledConnectionFactory.setMaximumActive(5000);
pooledConnectionFactory.start();