Print
AMQPool

AMQPool

Jencks contains an JMS pooled ConnectionFactory specific for ActiveMQ. The main difference with the ActiveMQ provided one is that it plays nicely in a transacted environment (XA or JCA) and can also have better performances in some cases (see this blog).

This connection pool comes with three spring factories:

Note that you always use a JcaPooledConnectionFactory if you prefer.

Parameters

Property

Type

Description

connectionFactory

org.apache.activemq.ActiveMQConnectionFactory

The underlying ActiveMQ connection factory to use. You can provide it directly or let the factory create it for you using the brokerUrl property

brokerUrl

String

The URL of the ActiveMQ broker (tcp://localhost:61616 for example

maxConnections

int

The number of connections to the broker to use simultaneously. The default value is 1, but you can safely increase it to 8 or so in all conditions.

maximumActive

int

The maximum number of active sessions for a given connection (defaults to 500)

poolFactory

org.apache.commons.pool.ObjectPoolFactory

the pool factory if you want a specific behavior (a default one will be created that is usually fine)

transactionManager

javax.transaction.TransactionManager

For XA and JCA pools, the transaction manager should be set

name

String

For JCA pools, a name must be set to a unique string identifying the activemq broker

Spring configuration

XBean configuration

If you're using XBean, you can use the following syntax:

Powered by Atlassian Confluence