The PooledConnectionFactory just pools created connections so that they can be 
reused. The connections are created as you've noted on createConnection. 

A really good description of its behaviour is written in doc see here:
http://activemq.apache.org/maven/5.15.0/apidocs/org/apache/activemq/jms/pool/PooledConnectionFactory.html


Cheers,
Mike.

Sent from my iPhone

> On 3 Jul 2017, at 07:17, jochenw <jochen.walz.m...@googlemail.com> wrote:
> 
> Hello,
> 
> I'm just starting using the PooledConnectionFactory. Before calling the
> start() method, the idleTimeout (30000 ms), the maxConnections (10) and the
> maximumActiveSessionPerConnection (500) are set.
> 
> I would have expected that on startup, 10 connections are opened to the
> broker (tcp://0.0.0.0:61616), and these 10 connections are used when I start
> sending messages. However, on each
> pooledConnectionFactory.createConnection(), there is another entry in the
> log "Successfully connected to tcp://0.0.0.0:61616".
> 
> It this log entry also appearing when creating a connection to a connection
> pool although no new broker connection is opened? Or does this mean that a
> new connection is set up to the broker - indicating that I did something
> wrong when using the connection pool?
> 
> Regards,
> Jochen
> 
> 
> 
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/PooledConnectionFactory-createConnection-results-in-log-entry-Successfully-connected-to-tp4728188.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to