-
1. Re: Difference between org.apache.activemq.ra.ActiveMQManagedConnectionFactory and org.apache.activemq.pool.PooledConnectionFactory
mnovak Jun 22, 2016 6:13 AM (in response to kmandal)You have very good question. I'll try to explain. If you have simple JMS ConnectionFactory (as defined in JMS specification) then there is no connection pooling. In this case it's anti-pattern to create->close connection for every message because it's expensive and performance bottleneck. Unfortunately this is exactly what Spring does.
Basically connection pooling is solution.
PooledConnectionFactory is providing connection pooling above what simple JMS ConnectionFactory can do. But if offers nothing else. ActiveMQManagedConnectionFactory offers more than just connection pooling. It allow to use some other features which from application server (EAP 6.x). For example you can have XA transaction associated with your connection or also use security domains defined in application server.
So recommendation is that if you do not need any application server features then you probably get better performance with PooledConnectionFactory. If you need them or you just want to be on the safe side then use ActiveMQManagedConnectionFactory.