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:
- PooledConnectionFactory: this is the most simple one that can be used in non transacted environments
- XaPooledConnectionFactory: this factory supports XA transaction late enlistement
- JcaPooledConnectionFactory: this one can be used inside jencks JCA environment
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 ( |
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:
