Configuration of the ResourceAdapter object
The ResourceAdapter object encapsulates the global properties of the IBM® MQ resource adapter. Define these properties using the facilities of your resource adapter.
- Properties associated with diagnostic tracing
- Properties associated with the connection pool managed by the resource adapter
For more information about defining properties associated with diagnostic trace, see Tracing the IBM MQ Resource Adapter
Name of property | Type | Default value | Description |
---|---|---|---|
maxConnections | String | 50 | The maximum number of connections to an IBM MQ queue manager and the maximum number of MDBs deployed. |
connectionConcurrency | String | 1 | The maximum number of MDBs to share a JMS connection. Sharing connections is not possible and this property always has the value 1. |
reconnectionRetryCount | String | 5 | The maximum number of attempts made by the resource adapter to reconnect to an IBM MQ queue manager if a connection fails. |
reconnectionRetryInterval | String | 300 000 | The time, in milliseconds, that the resource adapter waits before trying to reconnect to an IBM MQ queue manager. |
startupRetryCount | String | 0 | The default number of times to try and connect a MDB on startup, if the queue manager is not running when the application server is started. |
startupRetryInterval | String | 30 000 | The default sleep time between startup connection attempts (in milliseconds). |
When an MDB is deployed in the application server, a new JMS connection is created and a conversation started with the queue manager, provided the maximum number of connections specified by the maxConnection property is not exceeded. The maximum number of MDBs therefore equals the maximum number of connections. If the number of deployed MDBs reaches this maximum, any attempt to deploy another MDB fails. If an MDB is stopped, its connection can be used by another MDB.
In general, if many MDBs are to be deployed, you must increase the value of the maxConnections property.
The reconnectionRetryCount and reconnectionRetryInterval properties govern the behavior of the resource adapter when connections to an IBM MQ queue manager fail, because of a network failure for example. When a connection fails, the resource adapter suspends the delivery of messages to all MDBs supplied by that connection for an interval specified by the reconnectionRetryInterval property. The resource adapter then attempts to reconnect to the queue manager. If the attempt fails, the resource adapter makes further attempts to reconnect at intervals specified by the reconnectionRetryInterval property until the limit imposed by the reconnectionRetryCount property is reached. If all attempts fail, delivery is stopped permanently until the MDBs are restarted manually.
traceEnabled: true
traceLevel: 10
java ... -DtraceEnabled=true -DtraceLevel=6
You do not need to define all the properties of the ResourceAdapter object. Any properties left unspecified take their default values. In a managed environment, it is better not to mix the two ways of specifying properties. If you do mix them, the JVM system properties take precedence over the properties of the ResourceAdapter object.