Description
In org.apache.activemq.camel.component.ActiveMQConfiguration
We have default values
private boolean useSingleConnection = false;
private boolean usePooledConnection = true;
And the javadoc says
/** * Enables or disables whether a Spring {@link SingleConnectionFactory} will be used so that when * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer * for each message then close them all down again. * <p/> * The default value is true so that a single connection is used by default. * * @param useSingleConnection */ public void setUseSingleConnection(boolean useSingleConnection) { this.useSingleConnection = useSingleConnection; } /** * Enables or disables whether a PooledConnectionFactory will be used so that when * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer * for each message then close them all down again. * <p/> * The default value is false by default as it requires an extra dependency on commons-pool. */ public void setUsePooledConnection(boolean usePooledConnection) { this.usePooledConnection = usePooledConnection; }
Notice the javadoc has wrong defaults. Its in fact pooled that is the default.